startsWith()

Determines whether a string starts with the characters of a specified string.

This function is valid in v2.13.0 to v2.14.0. This function has been downloaded 25 times.

Parameters

{string} string
The string that will be searched.
{string} target
The characters to be searched for at the start of string.
{number=} opt_fromIndex Optional
The position in string at which to begin searching for target.

Returns

{boolean}
A boolean indicating whether or not target is at the start of string.