Nodejs Utililty Methods String from Hex

List of utility methods to do String from Hex

Description

The list of methods to do String from Hex are organized into topic(s).

Method

fromHex()
String.prototype.fromHex = String.prototype.fromHex || function () {
    var len = this.length/2,
        ret = new Array(len);
    for (var i = 0; i < len; i++) {
        ret[i] = parseInt('0x' + this[2*i] + this[2*i+1]);
    return String.fromCharCode.apply(this,ret);
};
fromHex()
String.prototype.fromHex = function() {
  for (var hex = this.split(' '), i = 0, $ = '', h; h = hex[i]; i++) $ += String.fromCharCode(parseInt(h, 16));
  return $;
};