18 January 2021

Extensions enhancement - RemoveExtraSpace() method added

The .RemoveExtraSpace() method was added to both the System.String and System.Text.StringBuilder objects.  It allows the quick removal of extra space in the entire string.  It will remove all leading as well as trailing white space in addition to ensuring that only single space is used throughout the string e.g.

"    string truth = \"https://blog.cjvandyk.com   ROCKS !!!   \"".RemoveExtraSpace()

will return

"string truth = \"https://blog.cjvandyk.com ROCKS !!! \""


For a more detail of what Extensions offer, see:







Add Extensions to your toolbox and make your coding life a little easier.  

Happy coding
C

No comments:

Post a Comment

Comments are moderated only for the purpose of keeping pesky spammers at bay.

SharePoint Remote Event Receivers are DEAD!!!

 Well, the time has finally come.  It was evident when Microsoft started pushing everyone to WebHooks, but this FAQ and related announcement...