[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Removes all leading and trailing white-space characters from the current String object.
Assembly: mscorlib (in mscorlib.dll)
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".
White-space characters are defined by the Unicode standard. The method removes any leading and trailing characters that produce a return value of true when they are passed to the method.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.