SUBSTR Function
Function Type | Predefined function | |
Syntax | SUBSTR( <integerBegin>, <integerEnd>, <stringValue> ) | |
Description | Returns the substring of <stringValue> as defined by the beginning and end indexes. | |
Argument | Description | |
<integerBegin> | Index to begin the substring. The <integerBegin> argument is inclusive, meaning that the character at the index specified will be the first character included in the substring. | |
<integerEnd> | Index to end the substring. The <integerEnd> argument is exclusive, meaning that the character at the index specified will not be included in the substring. Only characters before this index can be included. | |
<stringValue> | String from which to retrieve the substring. | |
Returns | String | |
Example | If a string has a value of "Discombobulated", then the function SUBSTR(6,9,"discombobulated") will return a value of "bob". If a string has a value of "123-45-6789" and you want to return the last four characters, the function should look like this: SUBSTR(7,11,"123-45-6789") |