string class : Trim() method
Description
Returns a string that removed whitespace characters at the beginning and end of the caller.
Syntax
stringInstance.Trim()
Arguments
None
Return value
Class | Description |
string | A string that removed whitespace characters at the beginning and end. |
Sample code
//anyString is a instance of string type.
string trimmedString = anyString.Trim();
Notes
It's a wrapper of the System.String.Trim().