MCPcopy Create free account
hub / github.com/microsoft/SandDance / asciiToBytes

Function asciiToBytes

docs/app/js/sanddance-app.js:114030–114035  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

114028 return bytes;
114029}
114030function asciiToBytes(str) {
114031 var byteArray = [];
114032 for(var i = 0; i < str.length; ++i)// Node's code seems to be doing this and not & 0x7F..
114033 byteArray.push(str.charCodeAt(i) & 0xFF);
114034 return byteArray;
114035}
114036function utf16leToBytes(str, units) {
114037 var c, hi, lo;
114038 var byteArray = [];

Callers 1

asciiWriteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected