If
n1 i
s less than one,
the function assumes the first character position. If
n1
is
greater than length of
s1
, the function assumes
the last character position.
n2
The number of characters to extract.
If
n2
is
less than or equal to 0, FormCalc returns an empty string. If
n1 + n2
is
greater than the length of
s1
, the function returns
the substring starting at position
n1
to the end
of
s1
.
Examples
The
following expressions are examples that use the
Substr
function:
Expression
Returns
Substr("ABCDEFG", 3, 4)
CDEF
Substr(3214, 2, 1)
2
Substr(Last_Name[0], 1, 3)
Returns the first three characters from
the first occurrence of
Last_Name
.