I have a string in the following format
string s = \"This is a Test String.\\n This is a next line.\\t This is a tab.\\n\'
I want to remo
FYI,
Trim() does that already.
The following LINQPad sample:
void Main() { var s = " \rsdsdsdsd\nsadasdasd\r\n "; s.Length.Dump(); s.Trim().Length.Dump(); }
Outputs:
23 18