MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / sliceByColumn

Function sliceByColumn

packages/pi-tui/src/utils.ts:1083–1085  ·  view source on GitHub ↗
(line: string, startCol: number, length: number, strict = false)

Source from the content-addressed store, hash-verified

1081 * @param strict - If true, exclude wide chars at boundary that would extend past the range
1082 */
1083export function sliceByColumn(line: string, startCol: number, length: number, strict = false): string {
1084 return sliceWithWidth(line, startCol, length, strict).text;
1085}
1086
1087/** Like sliceByColumn but also returns the actual visible width of the result. */
1088export function sliceWithWidth(

Callers 5

compositeOverlaysMethod · 0.90
compositeLineAtMethod · 0.90
doRenderMethod · 0.90
renderMethod · 0.90

Calls 1

sliceWithWidthFunction · 0.85

Tested by

no test coverage detected