What is trim () method?

The Trim method removes from the current string all leading and trailing white-space characters . Each leading and trailing trim operation stops when a non-white-space character is encountered. For example, if the current string is ” abc xyz “, the Trim method returns “abc xyz”.

Read more