encode_CHARARRAY function
dynamic
encode_CHARARRAY(
- dynamic v
Convert an ASCII string to a list of bytes. @param {string} @returns {Array}
Implementation
encode_CHARARRAY (v) {
if (v == null) {
v = '';
print('null CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name.');
}
var b = [];
for (var i = 0; i < v.length; i += 1) {
b[i] = v.charCodeAt(i);
}
return b;
}