substr:

Format:

substr: Rw, Rx, Ry | start[, Rz | length]

Copy a string from Rx with start Ry and optional length Rz to Rx. If Ry is not present, copies string from Rx to end of string.

Parameters:

Rw: A string register. If start is greater than length of Rx, Rw contains an empty string.
Rx: A register containing a string.
Ry | start: A numeric register or constant.
Rz | length: A numeric register or constant. If not present, defaults to end of string.