Skip to content

Instantly share code, notes, and snippets.

@flyte
Created January 9, 2014 13:46
Show Gist options
  • Save flyte/8334317 to your computer and use it in GitHub Desktop.
Save flyte/8334317 to your computer and use it in GitHub Desktop.
Return a string of the hex ASCII ordinal values of a string.
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