Click or drag to resize
StringTrim Method (Char)
Removes all leading and trailing occurrences of a set of characters specified in an array from the current String object.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public string Trim(
	params char[] trimChars
)

Parameters

trimChars
Type: SystemChar
An array of Unicode characters to remove, or null.

Return Value

Type: String
The string that remains after all occurrences of the characters in the trimChars parameter are removed from the start and end of the current string. If trimChars is null or an empty array, white-space characters are removed instead.
See Also