Tests if the specified string starts with the specified prefix (or one among several specified prefixes) beginning a specified index.
Parameters:
str
The string to be tested.
prefix
prefixes
The prefix or an array of prefixes.When an array of prefixes specified, the function returns
true
if the string starts with at least one of them.
tooffset
The index where to begin looking in the string. If not specified, 0 is assumed.
Tip:
You may call this function in a method-like style, e.g.:
str.startsWith("blah",5)