substr

Last update: 2023-01-23
  • Created for:
  • Experienced
    Developer

Returns the sub-string of the string expression between the begin index and the end index. If the end index is not defined, then it is between the begin index and the end.

Category

String

Function syntax

substr(<parameters>)

Parameters

Parameter type
string string
beginIndex integer
endIndex integer

Signature and returned type

substr(<string>,<beginIndex>)

substr(<string>,<beginIndex>,<endIndex>)

Return a string.

Example

substr("Hello World",6)

Returns “World”.

substr("Hello World", 0, 5)

Returns “Hello”.

On this page