How it works

The Instruction operation "substring" is a string processing operation that creates a substring from an initial input value. It needs two further inputs to work, the second input defines the position and the third the number of characters.

  • Note the result is zero indexed

"Substring" Examples

Example 1: Basic Usage

The example below returns "he", so this means that our substring starts at position "0", which is "h" and counts 2 characters.

<instruction operation="substring">
         <input value="hello " />
         <input value="0" /> 
         <input value="2" />
 </instruction>
he

Example 2: Basic Usage

The example below returns "is a substring", so this means that our substring starts at position "5", which is "i" and counts 14 characters, including spaces.

<instruction operation="substring">
         <input value="this is a substring operation" />
         <input value="5" /> 
         <input value="14" />
 </instruction>
is a substring



Last Modified: Thu, 15 Jan 2015