Created
January 9, 2014 13:46
-
-
Save flyte/8334317 to your computer and use it in GitHub Desktop.
Return a string of the hex ASCII ordinal values of a string.
This file contains hidden or 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
function toOrdinalHexString(str) { | |
ret = ""; | |
for (i=0; i < str.length; i++) { | |
c = str.charAt(i); | |
ret = ret.concat(c.charCodeAt(0).toString(16)); | |
} | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment