Description

Extracts a substring from a string. Does not affect the original string.

Syntax

variable [start, length, <unicodeFlag>]

Remarks

The brackets operator has the following parameters when used for extraction.

ParameterDescription
variableContains the string on which the extraction operation is performed.
startA positive or negative integer.

If start is a positive number, the operation will begin at the character in that position, counting from the first character or space at the beginning of the string. If start is a negative number, the operation will begin at the character in that position, counting from the last character or space at the end of the string. If start is 0 (zero) or 1, the operation will begin with the first character or space at the beginning of the string.

lengthNumber of characters to extract, beginning from start.

Each space and character within the string is counted as a character position. Also, note that the value specified for length includes the character position specified by start. If length begins with 'F', then the extraction process begins at start, and continues forward until the character following F is found. The character following F, which acts as a delimiter, is not included in the extraction. If length begins with 'B', the extraction process proceeds backward, until the delimiter is found.

unicode_flagWhen TRUE, this will extract from a binary string. This is either set to TRUE or not set at all.
  • No labels