Substring

Extracts a portion of the enclosed tokens.

Fields

Start

Specify the starting character index:

  • Index 0 is the first character.

  • Positive indexes are an offset from the start of the string.

  • Index -1 is the last character.

  • Negative indexes are an offset from the last character toward the start of the string.

For example, if the start is specified as -2, then it starts reading the first character from the end. If -3 is specified, then is starts 2 characters from the end.

Length

Number of characters from the start to include in the substring. Negative numbers are interpreted as (total # of characters + length) + 1. For example, -1 represents the entire length or the original string. If -2 is specified, the length is the entire -1. For a string with 5 characters a length of -1 = (5 + (-1)) + 1 = 5, -2 = (5 + (-2)) + 1 = 4, etc.