How can I remove all white space from the beginning and end of a string?
Like so:
"hello" returns "hello" "hello " returns "hello" " hello " returns "hello" " hello world " returns "hello world"
"hello"
"hello "
" hello "
" hello world "
"hello world"
string a = " Hello "; string trimmed = a.Trim();
trimmed is now "Hello"
trimmed
"Hello"