MCPcopy Index your code
hub / github.com/banga/git-split-diffs / appendString

Method appendString

src/SpannedString.ts:54–66  ·  view source on GitHub ↗
(string: string, ...attributes: T[])

Source from the content-addressed store, hash-verified

52 }
53
54 appendString(string: string, ...attributes: T[]): SpannedString<T> {
55 const startIndex = this._string.length;
56 const endIndex = startIndex + string.length;
57
58 this._string += string;
59 this._spanMarkers = this._spanMarkers.concat(new Array(string.length));
60
61 for (const attribute of attributes) {
62 this.addSpan(startIndex, endIndex, attribute);
63 }
64
65 return this;
66 }
67
68 appendSpannedString(other: SpannedString<T>): SpannedString<T> {
69 this._string = this._string.concat(other._string);

Callers 13

fillWidthMethod · 0.95
iterFormatHunkSplitFunction · 0.80
benchmark.tsFile · 0.80
iterFormatHunkFunction · 0.80
wrapStringFunction · 0.80
iterFormatCommitBodyLineFunction · 0.80
formatAndFitHunkLineFunction · 0.80
iterFormatFileNameFunction · 0.80
formatFunction · 0.80

Calls 1

addSpanMethod · 0.95

Tested by 2

wrapStringFunction · 0.64
formatFunction · 0.64