Skip to main content

Substring

The Substring function extracts part of a string returning the extracted part in a new string.

Prototype

  Substring(String ; Start; Len)

Arguments


String String By value

Argument contains the input string.
The Argument can be a literal, encapsulated in single quotes or the result of an expression or a variable
(Studio only).

Start Number By value

Base zero, starting position within String.
The Argument can be the result of an expression or a variable (Studio only).

Len Number By value

The number of characters to extract from the original string.

Returns

String

The Resulting String.

Exception

Undefined

Undefined is returned if one of the three arguments is not valid or start /Len arguments exceed String length.

Example

Substring('this is my string' ; 5 ; 2)

This will return is.