MCPcopy Create free account
hub / github.com/banga/git-split-diffs / getCharWidths

Method getCharWidths

src/SpannedString.ts:188–194  ·  view source on GitHub ↗

* Returns the screen width per character.

()

Source from the content-addressed store, hash-verified

186 * Returns the screen width per character.
187 */
188 getCharWidths(): number[] {
189 const charWidths: number[] = [];
190 for (const char of this._string) {
191 charWidths.push(wcwidth(char));
192 }
193 return charWidths;
194 }
195
196 *iterSubstrings(): IterableIterator<[string, T[]]> {
197 const activeSpansById = new Map<number, Span<T>>();

Callers 1

wrapSpannedStringByWordFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected