TypeScript String substr()
Syntax & Examples


Syntax of String.substr()

The syntax of String.substr() method is:

substr(from: number, length?: number): string

This substr() method of String gets a substring beginning at the specified location and having the specified length.