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

Function cpSlice

packages/cli/src/ui/utils/textUtils.ts:37–41  ·  view source on GitHub ↗
(str: string, start: number, end?: number)

Source from the content-addressed store, hash-verified

35}
36
37export function cpSlice(str: string, start: number, end?: number): string {
38 // Slice by code‑point indices and re‑join.
39 const arr = toCodePoints(str).slice(start, end);
40 return arr.join('');
41}

Callers 3

InputPromptFunction · 0.85
replaceRangeInternalFunction · 0.85
textBufferReducerFunction · 0.85

Calls 1

toCodePointsFunction · 0.85

Tested by

no test coverage detected