string class : Trim(string) method
Description
Returns a string that removed specified characters at the beginning and end of the caller.
Syntax
stringInstance.Trim(string charList)
Arguments
Class | Name | Description |
string | charList | Characters to remove. |
Return value
Class | Description |
string | A string that removed specified characters at the beginning and end. |
Sample code
1: | string org = "abcbcDDDDDDcbabb"; |
2: | string result = org.Trim("abc"); // result is "DDDDDD". |
It is not "abc" that was deleted. 'a', 'b', and 'c' were removed.
Notes
The individual characters in the argument string are removed regardless of their appearance order.
Links for reference
None