countASCII

fnsize_t countASCII(const(char)[] buffer) @safe pure nothrow @nogc

Counts the number of ASCII characters in buffer until the first UTF-8 sequence.

Used to determine how many characters we can process without decoding.