Tests if the substring of this string beginning at the specified index starts with the specified prefix.
prefix | the prefix. | |
toffset | where to begin looking in this string. |
true if the character sequence represented by the
argument is a prefix of the substring of this object starting
at index toffset; false otherwise.
The result is false if toffset is
negative or greater than the length of this
String object; otherwise the result is the same
as the result of the expression
this.substring(toffset).startsWith(prefix)
Diagram: String