Here you can find the source of decode()
String.prototype.decode = function() { var regExp = "%26#([0-9]*);"; var thisStr = this; while (true) { var data = thisStr.match( unescape(regExp) ); if (!data) break; thisStr = thisStr.replace( data[0], String.fromCharCode( data[1] ) ); }/*from ww w. j ava 2s .co m*/ return thisStr; }
String.prototype.decode = function () { if (!arguments.length) return this; var result = arguments.length % 2 !== 0 ? arguments[arguments.length - 1] : ''; for (var i = 0; i < arguments.length; i++) { if (this === arguments[i]) { result = arguments[i + 1]; i++; break; ...