MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / utf8_width

Function utf8_width

codegraph-kernel/grammars/kotlin/scanner.c:125–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123static inline void advance(TSLexer *lexer) { lexer->advance(lexer, false); }
124
125static unsigned utf8_width(int32_t c) {
126 return c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
127}
128
129static void advance_counted(TSLexer *lexer, uint32_t *bytes, bool whitespace) {
130 if (bytes) {

Callers 1

advance_countedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected