klyn.code.CodeTokenizer.startsWithAt
method
public static startsWithAt(text as String, token as String, start as Long) as Boolean
Description

Zero-allocation substring prefix check at start inside text.

Parameters
ParameterDescription
textSource text to inspect.
tokenPrefix to match.
startZero-based index in text.
Returns

true when text starts with token at start.

Example
import klyn.code

assert CodeTokenizer.startsWithAt("public class", "class", 7)