Skip to content

Instantly share code, notes, and snippets.

@damirka
Created February 14, 2018 12:36
Show Gist options
  • Save damirka/8b92252669746e6644a1289083b31ad7 to your computer and use it in GitHub Desktop.
Save damirka/8b92252669746e6644a1289083b31ad7 to your computer and use it in GitHub Desktop.
Luv it <3
function toHex(s) {
var hex = ‘’;
for (var i=0;i<s.length;i++) { hex += ‘’+s.charCodeAt(i).toString(16); }
return `0x${hex}`;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment