MCPcopy
hub / github.com/exceljs/exceljs / addText

Method addText

lib/utils/string-buf.js:52–66  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

50 }
51
52 addText(text) {
53 this._buffer = undefined;
54
55 let inPos = this._inPos + this._buf.write(text, this._inPos, this._encoding);
56
57 // if we've hit (or nearing capacity), grow the buf
58 while (inPos >= this._buf.length - 4) {
59 this._grow(this._inPos + text.length);
60
61 // keep trying to write until we've completely written the text
62 inPos = this._inPos + this._buf.write(text, this._inPos, this._encoding);
63 }
64
65 this._inPos = inPos;
66 }
67
68 addStringBuf(inBuf) {
69 if (inBuf.length) {

Callers 9

testFunction · 0.95
_writeMethod · 0.45
_writeSheetPropertiesMethod · 0.45
_writeOpenWorksheetMethod · 0.45
_writeMergeCellsMethod · 0.45
_writeLegacyDataMethod · 0.45
string-buf.spec.jsFile · 0.45
stream-buf.spec.jsFile · 0.45

Calls 2

_growMethod · 0.95
writeMethod · 0.65

Tested by 1

testFunction · 0.76