lib/ble/data/gatt/services/members/google.js
function parseEncodedUrl(encodedUrl) {
  var url = '';

  for(var cChar = 0; cChar < (encodedUrl.length / 2); cChar++) {
    var charCode = parseInt(encodedUrl.substr(cChar*2,2),16);
    switch(charCode) {
      case 0x00:
        url += ".com/";
        break;
      case 0x01:
        url += ".org/";
        break;
      case 0x02:
        url += ".edu/";
        break;
      case 0x03:
        url += ".net/";
        break;
      case 0x04:
        url += ".info/";
        break;
      case 0x05:
        url += ".biz/";
        break;
      case 0x06:
        url += ".gov/";
        break;
      case 0x07:
        url += ".com";
        break;
      case 0x08:
        url += ".org";
        break;
      case 0x09:
        url += ".edu";
        break;
      case 0x0a:
        url += ".net";
        break;
      case 0x0b:
        url += ".info";
        break;
      case 0x0c:
        url += ".biz";
        break;
      case 0x0d:
        url += ".gov";
        break;
      default:
        url += String.fromCharCode(charCode);
    }
  }

  return url;
}
function parseEncodedUrl(encodedUrl) {
  var url = '';

  for(var cChar = 0; cChar < (encodedUrl.length / 2); cChar++) {
    var charCode = parseInt(encodedUrl.substr(cChar*2,2),16);
    switch(charCode) {
      case 0x00:
        url += ".com/";
        break;
      case 0x01:
        url += ".org/";
        break;
      case 0x02:
        url += ".edu/";
        break;
      case 0x03:
        url += ".net/";
        break;
      case 0x04:
        url += ".info/";
        break;
      case 0x05:
        url += ".biz/";
        break;
      case 0x06:
        url += ".gov/";
        break;
      case 0x07:
        url += ".com";
        break;
      case 0x08:
        url += ".org";
        break;
      case 0x09:
        url += ".edu";
        break;
      case 0x0a:
        url += ".net";
        break;
      case 0x0b:
        url += ".info";
        break;
      case 0x0c:
        url += ".biz";
        break;
      case 0x0d:
        url += ".gov";
        break;
      default:
        url += String.fromCharCode(charCode);
    }
  }

  return url;
}
function parseEncodedUrl ( encodedUrl ) { var url = '' ; for ( var cChar = 0 ; cChar < ( encodedUrl . length / 2 ) ; cChar ++ ) { var charCode = parseInt ( encodedUrl . substr ( cChar * 2 , 2 ) , 16 ) ; switch ( charCode ) { case 0x00 : url += ".com/" ; break ; case 0x01 : url += ".org/" ; break ; case 0x02 : url += ".edu/" ; break ; case 0x03 : url += ".net/" ; break ; case 0x04 : url += ".info/" ; break ; case 0x05 : url += ".biz/" ; break ; case 0x06 : url += ".gov/" ; break ; case 0x07 : url += ".com" ; break ; case 0x08 : url += ".org" ; break ; case 0x09 : url += ".edu" ; break ; case 0x0a : url += ".net" ; break ; case 0x0b : url += ".info" ; break ; case 0x0c : url += ".biz" ; break ; case 0x0d : url += ".gov" ; break ; default : url += String . fromCharCode ( charCode ) ; } } return url ; }
Parse encoded URL.
@param {String} encodedUrl The encoded URL as a hexadecimal string.
@return {String} The suffix of the URL.
Parse encoded URL .