SYNTAX

<String>.substring( <Integer1>, <Integer2>)

Returns the portion of <String> beginning with the character in position <Integer1> and ending with the character in position <Integer2>. The number of characters in <String> must be at least equal to <Integer2>, otherwise an error will be produced. Both <Integer1> and <Integer2> must be positive integers, and <Integer2> must be greater than <Integer1>.

The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.

This sample Rulesheet uses .substring to return those characters of string1 between positions 4 and 7 (inclusive), and assign the resulting value to string2.

A sample Ruletest provides string1 values for four examples. Input and Output panels are shown below.