SyntaxFix
Write A Post
Hire A Developer
Questions
To remove ALL spaces:
myString = myString.Replace(" ", "")
To remove leading and trailing spaces:
myString = myString.Trim()
Note: this removes any white space, so newlines, tabs, etc. would be removed.