A good string transcoding and decoding function written by myself. If you need it, refer to it.
Function isString (variable) {return Object. prototype. toString. call (variable). indexOf ('string ')! =-1;} function isNumeric (variable) {return! IsNaN (parseFloat (variable) & isFinite (variable);} function stringEncode (string) {string = isString (string) | isNumeric (string )? String (string): ''; var code, I = 0, code_string ='', len = string. length; while (I <string. length) {code = string. charCodeAt (I); code_string + = ''+ String (code ). length + code; I ++;} return code_string;} function stringDecode (code) {var I = 0, code_len, decode_string = ''; code = String (code ); while (I <code. length) {code_len = + code. charAt (I); I ++; decode_string + = String. fromCharCode (+ code. substr (I, code_len); I + = code_len;} return decode_string ;}