MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / countTokens

Function countTokens

src/compute-engine/latex-syntax/tokenizer.ts:425–427  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

423 // to report discarded-comment spans. `parts` alternates line, separator,
424 // line, separator, …; even indices are lines, odd indices are the following
425 // separator (or `undefined` for the last line).
426 const str = s.toString();
427 const parts = str.split(/(\r?\n)/);
428 let stream = '';
429 let sep = '';
430 // Offset of the start of the current line in the original string. Advanced

Callers 2

parseSymbolBodyFunction · 0.90
addEntryFunction · 0.90

Calls 1

tokenizeFunction · 0.85

Tested by

no test coverage detected