Lines Matching refs:code
175 chr: function (code) argument
177 return String.fromCharCode(code);
183 code2utf: function (code) argument
185 if (code < 128) return this.chr(code);
186 if (code < 2048) return this.chr(192+(code>>6)) + this.chr(128+(code&63));
187 …if (code < 65536) return this.chr(224+(code>>12)) + this.chr(128+((code>>6)&63)) + this.chr(128+(c…
188 …if (code < 2097152) return this.chr(240+(code>>18)) + this.chr(128+((code>>12)&63)) + this.chr(128…
196 var code,code2,code3,code4,j = 0;
198 code = utf8str.charCodeAt(i++);
201 if (code > 127) code2 = utf8str.charCodeAt(i++);
202 if (code > 223) code3 = utf8str.charCodeAt(i++);
203 if (code > 239) code4 = utf8str.charCodeAt(i++);
205 if (code < 128) str[j++]= this.chr(code);
206 else if (code < 224) str[j++] = this.chr(((code-192)<<6) + (code2-128));
207 else if (code < 240) str[j++] = this.chr(((code-224)<<12) + ((code2-128)<<6) + (code3-128));
208 else str[j++] = this.chr(((code-240)<<18) + ((code2-128)<<12) + ((code3-128)<<6) + (code4-128));