Lines Matching refs:code
179 chr: function (code) argument
181 return String.fromCharCode(code);
187 code2utf: function (code) argument
189 if (code < 128) return this.chr(code);
190 if (code < 2048) return this.chr(192+(code>>6)) + this.chr(128+(code&63));
191 …if (code < 65536) return this.chr(224+(code>>12)) + this.chr(128+((code>>6)&63)) + this.chr(128+(c…
192 …if (code < 2097152) return this.chr(240+(code>>18)) + this.chr(128+((code>>12)&63)) + this.chr(128…
200 var code,code2,code3,code4,j = 0;
202 code = utf8str.charCodeAt(i++);
205 if (code > 127) code2 = utf8str.charCodeAt(i++);
206 if (code > 223) code3 = utf8str.charCodeAt(i++);
207 if (code > 239) code4 = utf8str.charCodeAt(i++);
209 if (code < 128) str[j++]= this.chr(code);
210 else if (code < 224) str[j++] = this.chr(((code-192)<<6) + (code2-128));
211 else if (code < 240) str[j++] = this.chr(((code-224)<<12) + ((code2-128)<<6) + (code3-128));
212 else str[j++] = this.chr(((code-240)<<18) + ((code2-128)<<12) + ((code3-128)<<6) + (code4-128));