Removes all leading and trailing occurrences of a set of characters specified in an array from the current
String object.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public string Trim(
params char[] trimChars
)
Parameters
- trimChars
- Type: SystemChar
An array of Unicode characters to remove, or null.
Return Value
Type:
StringThe 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