Skip to content

String

Unofficial

Augments the built-in String interface.

Signature:

export interface String

Methods

Method Returns Description
contains(target) boolean Checks if the string contains a specific substring.
endsWith(searchString, endPosition?) boolean Checks if the string ends with a specific substring.
format(args?) string Formats a string using the indexed placeholders.
startsWith(searchString, position?) boolean Checks if the string starts with a specific substring.