Skip to main content

Overview

This function returns a selected range of characters within a given string.

Parameters

substring(string, fromIndex, toIndex)
  • String: The original string to extract from.
  • From Index: The starting position (inclusive).
  • To Index: The ending position (exclusive).

Example

substring("Hello World", 0, 5)
Returns "Hello".
I