MCPcopy
hub / github.com/xtermjs/xterm.js / getString

Method getString

src/common/buffer/BufferLine.ts:160–170  ·  view source on GitHub ↗

Returns the string content of the cell.

(index: number)

Source from the content-addressed store, hash-verified

158
159 /** Returns the string content of the cell. */
160 public getString(index: number): string {
161 const content = this._data[index * CELL_SIZE + Cell.CONTENT];
162 if (content & Content.IS_COMBINED_MASK) {
163 return this._combined[index];
164 }
165 if (content & Content.CODEPOINT_MASK) {
166 return stringFromCodePoint(content & Content.CODEPOINT_MASK);
167 }
168 // return empty string for empty cells
169 return '';
170 }
171
172 /** Get state of protected flag. */
173 public isProtected(index: number): number {

Callers

nothing calls this directly

Calls 1

stringFromCodePointFunction · 0.90

Tested by

no test coverage detected