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

Returns a section of a string.

Parameters

optional
start: number

The index to the beginning of the specified portion of stringObj.

optional
end: number

The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. If this value is not specified, the substring continues to the end of stringObj.

Return Type

string