You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

substring()

Usage

substring(string, start, length)

Description
Returns a portion with the given length of the given string, starting from the given start index.

Example

${substring('This is a test', 10, 4)}

results in

test

Search results for "substring()"

substring()

Returns a portion with the given length of the given string, starting from the given start index. If no length parameter is given or the length would exceed the string length (calculated from the start index), the rest of the string is returned.

substring(string, start [, length ])