MCPcopy
hub / github.com/nirui/sshwifty / buffer

Method buffer

ui/commands/string.js:63–71  ·  view source on GitHub ↗

* Return serialized String as array * * @returns {Uint8Array} serialized String *

()

Source from the content-addressed store, hash-verified

61 *
62 */
63 buffer() {
64 let lBytes = new integer.Integer(this.str.length).marshal(),
65 buf = new Uint8Array(lBytes.length + this.str.length);
66
67 buf.set(lBytes, 0);
68 buf.set(this.str, lBytes.length);
69
70 return buf;
71 }
72}

Callers 3

runMethod · 0.95
address_test.jsFile · 0.45
string_test.jsFile · 0.45

Calls 2

marshalMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected