Commit 1954b878 authored by caktux's avatar caktux

bring back toHex

parent 123098ce
...@@ -227,6 +227,16 @@ var web3 = { ...@@ -227,6 +227,16 @@ var web3 = {
_events: {}, _events: {},
providers: {}, providers: {},
toHex: function(str) {
var hex = "";
for(var i = 0; i < str.length; i++) {
var n = str.charCodeAt(i).toString(16);
hex += n.length < 2 ? '0' + n : n;
}
return hex;
},
toAscii: function(hex) { toAscii: function(hex) {
// Find termination // Find termination
var str = ""; var str = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment