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

Function cpLen

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

Source from the content-addressed store, hash-verified

31}
32
33export function cpLen(str: string): number {
34 return toCodePoints(str).length;
35}
36
37export function cpSlice(str: string, start: number, end?: number): string {
38 // Slice by code‑point indices and re‑join.

Callers 10

InputPromptFunction · 0.85
currentLineLenFunction · 0.85
replaceRangeInternalFunction · 0.85
offsetToLogicalPosFunction · 0.85
logicalPosToOffsetFunction · 0.85
calculateVisualLayoutFunction · 0.85
textBufferReducerFunction · 0.85
handleVimActionFunction · 0.85

Calls 1

toCodePointsFunction · 0.85

Tested by

no test coverage detected