Next: , Previous: , Up: String instructions   [Contents][Index]


17.1.18.2 Instruction substr

Synopsys:

substr

Given a string and two indexes FROM AND to conforming a semi-open interval [FROM,TO), push the substring enclosed by that interval.

Both indexes are zero-based.

If FROM >= the size of the string, or if TO > the size of the string, or if FROM >= TO, raise the PVM_E_OUT_OF_BOUNDS exception.

Stack: ( STR ULONG(from) ULONG(to) -- STR ULONG(from) ULONG(to) STR )

Exceptions: PVM_E_OUT_OF_BOUNDS