Lines Matching refs:string

32 #include <string.h>
139 utf8sToUtf8mLength(struct UtfInst *ui, jbyte *string, int length)
148 byte = (unsigned char)string[i];
156 if ( (i+1) >= length || (string[i+1] & 0xC0) != 0x80 ) {
163 if ( (i+2) >= length || (string[i+1] & 0xC0) != 0x80
164 || (string[i+2] & 0xC0) != 0x80 ) {
171 if ( (i+3) >= length || (string[i+1] & 0xC0) != 0x80
172 || (string[i+2] & 0xC0) != 0x80
173 || (string[i+3] & 0xC0) != 0x80 ) {
197 utf8sToUtf8m(struct UtfInst *ui, jbyte *string, int length, jbyte *newString, int newLength)
206 byte1 = (unsigned char)string[i];
220 newString[j++] = string[++i];
223 newString[j++] = string[++i];
224 newString[j++] = string[++i];
230 byte2 = (unsigned char)string[++i];
231 byte3 = (unsigned char)string[++i];
232 byte4 = (unsigned char)string[++i];
253 /* Given a Modified UTF-8 string, calculate the Standard UTF-8 length.
261 utf8mToUtf8sLength(struct UtfInst *ui, jbyte *string, int length)
270 byte1 = (unsigned char)string[i];
275 if ( (i+1) >= length || (string[i+1] & 0xC0) != 0x80 ) {
278 byte2 = (unsigned char)string[++i];
286 if ( (i+2) >= length || (string[i+1] & 0xC0) != 0x80
287 || (string[i+2] & 0xC0) != 0x80 ) {
290 byte2 = (unsigned char)string[++i];
291 byte3 = (unsigned char)string[++i];
296 byte4 = (unsigned char)string[i+1];
297 byte5 = (unsigned char)string[i+2];
298 byte6 = (unsigned char)string[i+3];
304 newLength++; /* New string will have 4byte encoding */
320 /* Convert a Modified UTF-8 string into a Standard UTF-8 string
321 * It is assumed that this string has been validated in terms of the
328 utf8mToUtf8s(struct UtfInst *ui, jbyte *string, int length, jbyte *newString, int newLength)
337 byte1 = (unsigned char)string[i];
342 byte2 = (unsigned char)string[++i];
350 byte2 = (unsigned char)string[++i];
351 byte3 = (unsigned char)string[++i];
354 byte4 = (unsigned char)string[i+1];
355 byte5 = (unsigned char)string[i+2];
356 byte6 = (unsigned char)string[i+3];
396 * Convert any byte array into a printable string.