Skip to main content

String

Allows manipulation and formatting of text strings and determination and location of substrings within strings.

Methods

contains

contains: (target: string) => boolean

startsWith

startsWith: { (searchString: string, position?: number): boolean; (searchString: string, position?: number): boolean; }

Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.

endsWith

endsWith: { (searchString: string, endPosition?: number): boolean; (target: string, length?: number): boolean; }

Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.

format

format: (...args: string[]) => string