Share via


String.Trim Method ()

Removes all white-space characters from the beginning and end of the current String object.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

[MethodImplAttribute]
public string Trim ()

Return Value

The String object that remains after all white-space characters have been removed from the beginning and end of the string.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

String Class
String Members
System Namespace