StringTokenImpl.fromUtf8Bytes constructor
StringTokenImpl.fromUtf8Bytes(})
Creates a lazy string token. If asciiOnly
is false, the byte array
is passed through a UTF-8 decoder.
Implementation
StringTokenImpl.fromUtf8Bytes(TokenType type, List<int> data, int start,
int end, bool asciiOnly, int charOffset,
{CommentToken? precedingComments})
: super(type, charOffset, precedingComments) {
int length = end - start;
if (length <= LAZY_THRESHOLD) {
valueOrLazySubstring = decodeUtf8(data, start, end, asciiOnly);
} else {
valueOrLazySubstring = new _LazySubstring(data, start, length, asciiOnly);
}
}