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 = \"   ROCKS !!!   \"".RemoveExtraSpace()

will return

"string truth = \" 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

Post a Comment

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