Returns a substring of a string, starting at a specified position and continuing for a specified number of characters.
Syntax
SUB(String, Value a, Value b)
Input
String | is a string |
Domain type: | any Class or ID domain, or system domain String |
Value a | is the value that specifies the starting position in the text string, from where the substring is returned |
Domain type: | any Value domain |
Value range: | >=1 |
Value b | is the value that specifies the number of characters that should be returned |
Domain type: | any Value domain |
Value range: | >=0 |
Output
SUB returns: | a string |
Domain type: | system domain String |
Notes:
Tip:
Usable in
Examples
Pocket line calculator examples:
? SUB("Landuse",5,3) |
returns use |
? SUB("Industrial",2.5,3.6) | returns dust |
TabCalc example:
OutCol = SUB(InCol,4,6)
InCol |
OutCol |
Institutional |
tituti |
Commercial |
mercia |
Residential |
identi |
? |
? |
Industrial |
ustria |
Recreational |
reatio |
Transport |
nsport |
Airport |
port |
Water |
er |
See also:
STRGE |