SyntaxFix
Write A Post
Hire A Developer
Questions
If you want to remove spaces at the beginning/end of a line too(common when shortening html) you can try:
string.Join("",input.Split('\n','\r').Select(s=>s.Trim()))
Else use the simple Replace Marc suggested.
Replace