Class: String

String()

new String()

Add some methods to standerd JavaScript object.

Methods

contains(string) → {Boolean}

Checks whether the string contains a given string.
Parameters:
Name Type Description
string String The string to search for
Returns:
True if the string contains a given string
Type
Boolean

format() → {String}

Replaces %1, %2 and so on in the string to the arguments.
Parameters:
Name Type Description
...args Any The objects to format
Returns:
A formatted string
Type
String

padZero(length) → {String}

Makes a number string with leading zeros.
Parameters:
Name Type Description
length Number The length of the output string
Returns:
A string with leading zeros
Type
String