subString

Returns a substring from a string expression.

Example

substring("Hello", 2)

In this example, substring returns “llo”.

Syntax

substring(string expr str, int start, [int end])
  • str: string to extract a substring from
  • start: 0 based starting position for the extracted string
  • end: optional last character of the substring to extract

    Returns

    string

Notes

subString returns a substring from str starting at the character given by start and continuing until the end of str. Note that start is zero based. If the optional third parameter end is used, the substring consists of the characters from start to end inclusive.

© Incorta, Inc. All Rights Reserved.