SubStr

Description:              This function returns a string that is a portion of another string.

Returns:                    Text

Usage:                   Script or Steady State

Format:                      SubStr(String, Start, Length)

Parameters:             String     { text }  { required }  { no default: }

                                                Any text expression giving the original string to extract the sub-string from.

                                    Start     { numeric }  { required }  { no default: }

                                                Any numeric expression giving the character offset from the start of String of where to start the resulting string. A value of 0 refers to the first character in String. If the Start is past the end of String, the result is invalid.

                                    Length     { numeric }  { required }  { no default: }

                                                Any numeric expression giving the number of characters to include in the resulting string starting with Start.

Comments:               If any parameter of this function is invalid, the return value is invalid.

Examples:

piece1 = SubStr("ABCDEF", 2, 3);

piece2 = SubStr("ABCDEF", 3, 4);

The values of piece1 and piece2 are "CDE" and "DEF" respectively.

See Also:

Concat | StrLen | Replace