MCPcopy Create free account
hub / github.com/anus-dev/ANUS / toCodePoints

Function toCodePoints

packages/cli/src/ui/utils/textUtils.ts:27–31  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

25 * ---------------------------------------------------------------------- */
26
27export function toCodePoints(str: string): string[] {
28 // [...str] or Array.from both iterate by UTF‑32 code point, handling
29 // surrogate pairs correctly.
30 return Array.from(str);
31}
32
33export function cpLen(str: string): number {
34 return toCodePoints(str).length;

Callers 14

findNextWordStartInLineFunction · 0.85
findPrevWordStartInLineFunction · 0.85
findWordEndInLineFunction · 0.85
findNextWordAcrossLinesFunction · 0.85
findPrevWordAcrossLinesFunction · 0.85
stripUnsafeCharactersFunction · 0.85
calculateVisualLayoutFunction · 0.85
textBufferReducerFunction · 0.85
useTextBufferFunction · 0.85
handleVimActionFunction · 0.85
cpLenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected