Home | History | Annotate | Download | only in npt

Lines Matching refs:string

32 #include <string.h>
145 utf8sToUtf8mLength(struct UtfInst *ui, jbyte *string, int length)
154 byte = (unsigned char)string[i];
162 if ( (i+1) >= length || (string[i+1] & 0xC0) != 0x80 ) {
169 if ( (i+2) >= length || (string[i+1] & 0xC0) != 0x80
170 || (string[i+2] & 0xC0) != 0x80 ) {
177 if ( (i+3) >= length || (string[i+1] & 0xC0) != 0x80
178 || (string[i+2] & 0xC0) != 0x80
179 || (string[i+3] & 0xC0) != 0x80 ) {
203 utf8sToUtf8m(struct UtfInst *ui, jbyte *string, int length, jbyte *newString, int newLength)
212 byte1 = (unsigned char)string[i];
226 newString[j++] = string[++i];
229 newString[j++] = string[++i];
230 newString[j++] = string[++i];
236 byte2 = (unsigned char)string[++i];
237 byte3 = (unsigned char)string[++i];
238 byte4 = (unsigned char)string[++i];
259 /* Given a Modified UTF-8 string, calculate the Standard UTF-8 length.
267 utf8mToUtf8sLength(struct UtfInst *ui, jbyte *string, int length)
276 byte1 = (unsigned char)string[i];
281 if ( (i+1) >= length || (string[i+1] & 0xC0) != 0x80 ) {
284 byte2 = (unsigned char)string[++i];
292 if ( (i+2) >= length || (string[i+1] & 0xC0) != 0x80
293 || (string[i+2] & 0xC0) != 0x80 ) {
296 byte2 = (unsigned char)string[++i];
297 byte3 = (unsigned char)string[++i];
302 byte4 = (unsigned char)string[i+1];
303 byte5 = (unsigned char)string[i+2];
304 byte6 = (unsigned char)string[i+3];
310 newLength++; /* New string will have 4byte encoding */
326 /* Convert a Modified UTF-8 string into a Standard UTF-8 string
327 * It is assumed that this string has been validated in terms of the
334 utf8mToUtf8s(struct UtfInst *ui, jbyte *string, int length, jbyte *newString, int newLength)
343 byte1 = (unsigned char)string[i];
348 byte2 = (unsigned char)string[++i];
356 byte2 = (unsigned char)string[++i];
357 byte3 = (unsigned char)string[++i];
360 byte4 = (unsigned char)string[i+1];
361 byte5 = (unsigned char)string[i+2];
362 byte6 = (unsigned char)string[i+3];
402 * Convert any byte array into a printable string.