Built-in Functions → subString
subString() is a string function that returns a substring from a string expression, starting with the character at a specified index by the second parameter. The first index starts at 0.
Signature
substring(string exp, int exp)
The following table illustrates the subString() parameters:
Parameter | Description |
---|---|
string exp | string to extract a substring from |
int exp | 0 based starting position for the extracted string |
Returns
string
Example
substring("Hello", 2)
In this example, substring
returns "llo".