MCPcopy Create free account
hub / github.com/Stuk/jszip / stringToArrayLike

Function stringToArrayLike

lib/utils.js:82–87  ·  view source on GitHub ↗

* Fill in an array with a string. * @param {String} str the string to use. * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated). * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.

(str, array)

Source from the content-addressed store, hash-verified

80 * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.
81 */
82function stringToArrayLike(str, array) {
83 for (var i = 0; i < str.length; ++i) {
84 array[i] = str.charCodeAt(i) & 0xFF;
85 }
86 return array;
87}
88
89/**
90 * An helper for the function arrayLikeToString.

Callers 2

string2binaryFunction · 0.85
utils.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected