@SUBSTR

Windows Linux macOS

Syntax

@SUBSTR(<string>,<pos1>,<pos2>)

Description

This function returns the substring of <string> starting at character position <pos1> and ending at character position <pos2>. The characters in the string are counted from 1.

If <pos1> is omitted or zero then the function returns <string> unmodified. If< pos2> is zero or omitted, just the single character at <pos1> is returned. If <pos2> is negative, the ending position is counted from the end of the string.

OK

Unchanged.

Example

%S = @substr(%A,4,8)

info Substring of %A from 4 to 8 is: %S

See also