method String.substring
Private
String.substring(
start: number,
end?: number,
): string

Returns the substring at the specified location within a String object.

Parameters

start: number

The zero-based index number indicating the beginning of the substring.

optional
end: number

Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. If end is omitted, the characters from start through the end of the original string are returned.

Return Type

string