Share via


String.TrimEnd Method

Removes all occurrences of a specified array of Unicode characters from the end of the current String object.

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

Syntax

[MethodImplAttribute]
public string TrimEnd (
         char[] trimChars
)

Parameters

  • trimChars
    [ParamArrayAttribute] The array of Unicode characters to be removed from the end of the current String object, or a null reference.

Return Value

The String object that remains after all occurrences of the characters specified in the trimChars parameter have been removed from the end of the string. If trimChars is a null reference, white-space characters are removed instead.

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