startsWith

Returns whether this array begins with the given prefix.

An empty prefix always matches, including against an empty array. A prefix longer than the array never matches. This function never throws.

Return

true if the first prefix.size bytes equal prefix.

Parameters

prefix

the byte sequence expected at index 0.