string class : SubString(int) method
Description
Gets a new instance of the string that is from the position that specified by the index to the end of the invoker string.
Syntax
stringINstance.SubString(int startPosition)
Arguments
Class | Name | Description |
int | startPosition | Starting position of the search. |
Return value
Class | Description |
string | A new instance of the string that is from the position that specified by the index to the end of the invoker string. |
Sample code
//anyString is a instance of string type.
string subString = anyString.SubString(5);
Notes
It's a wrapper of the System.Globalization.StringInfo.SubstringByTextElements(Int32).
The index is zero-based.