substring/4—retrieve a substring of a specified length beginning at a specified offset
The substring/4 function retrieves a substring of a specified length beginning at a specified offset.
$NEWSTR=substring($STR,$SKIP,$LEN)
substring/4 arguments
Argument | Mode | Type | Description |
---|---|---|---|
$STR | Input | STRING | Specifies the base string within which you want to retrieve another partial string that starts after $SKIP |
$SKIP | Input | INTEGER | Specifies the number of characters to skip in the base string before $NEWSTR begins |
$LEN | Input | INTEGER | Specifies the length of $NEWSTR |
$NEWSTR | Output | STRING | Retrieved string |
Use the substring/4 function to retrieve part of the string $STR into $NEWSTR. The retrieved part of the string starts $SKIP characters from the start of $STR and is $LEN characters long.
substring/4 example
$MM = substring($YYYYMMDD,4,2);
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*