MCPcopy Create free account
hub / github.com/dataease/SQLBot / hexWrite

Function hexWrite

frontend/public/swagger-ui-bundle.js:21771–21783  ·  view source on GitHub ↗
(s, o, i, a)

Source from the content-addressed store, hash-verified

21769 return -1
21770 }
21771 function hexWrite(s, o, i, a) {
21772 i = Number(i) || 0
21773 const u = s.length - i
21774 a ? (a = Number(a)) > u && (a = u) : (a = u)
21775 const _ = o.length
21776 let w
21777 for (a > _ / 2 && (a = _ / 2), w = 0; w < a; ++w) {
21778 const a = parseInt(o.substr(2 * w, 2), 16)
21779 if (numberIsNaN(a)) return w
21780 s[i + w] = a
21781 }
21782 return w
21783 }
21784 function utf8Write(s, o, i, a) {
21785 return blitBuffer(utf8ToBytes(o, s.length - i), s, i, a)
21786 }

Callers 1

Calls 1

numberIsNaNFunction · 0.85

Tested by

no test coverage detected