Functions

substring

Supported By

Syntax

[the] substring of ( string , begin [, end] )

substring ( string , begin [, end] )

String yields any string. Begin and end yield integers.

Description

The substring function returns end-begin characters of the specified string starting at begin. The first character of the string is at offset 1.

If no end is specified, all characters of the string starting at begin are returned.

Note

If end is less than or equal to begin, empty is returned.

See Also

mid, substr