startsWith

startsWith(string string, string prefix) → boolean startsWith
Checks whether given string starts with given prefix.

Checks whether the string string starts with the string prefix.

Parameters
Return
Examples

startsWith("Hello", "Hell") // true startsWith("Hello", "ello") // false

See also

endsWith