string class : TrimStart(string) method
Description
Returns a string that removed specified characters at the beginning of the caller.
Syntax
stringInstance.TrimStart(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. |
Sample code
1: | string org = "abcbcDDDDDDcbabb"; |
2: | string result = org.TrimStart("abc"); // result is "DDDDDDcbabb". |
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