bring back toHex

poc8
caktux 10 years ago
parent 123098ce79
commit 1954b87819
  1. 10
      lib/main.js

@ -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 = "";

Loading…
Cancel
Save