Created
September 11, 2015 19:06
-
-
Save ireeymonse/6b282679e54403686c93 to your computer and use it in GitHub Desktop.
Convert string to hex char array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var s = '['; | |
'STRING_GOES_HERE'.split ('').map (function (c) { s += '0x'+c.charCodeAt (0).toString(16)+','; }); | |
console.log(s+']'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment