Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Remove spaces in string in plugin

Posted on by Microsoft Employee

How to remove spaces in string in plugin.iam using replace method but it is not working any help. 

Ex:

string str="this is space";

Result:

thisisspace.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Remove spaces in string in plugin

    Hi,

    Try with this  -

    string str = "C Sharp";
    str = str.Replace(" ", "");


    Or you can also do using regular expression -

    string str = "C Sharp";
    str = Regex.Replace(str, @"\s", "");


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans