Lines Matching defs:str
28 int UTF8_getc(const unsigned char *str, int len, unsigned long *val)
35 p = str;
86 * This takes a character 'value' and writes the UTF8 encoded value in 'str'
87 * where 'str' is a buffer containing 'len' characters. Returns the number of
89 * range. 'str' can be set to NULL in which case it just returns the number of
93 int UTF8_putc(unsigned char *str, int len, unsigned long value)
95 if (!str)
100 if (str)
101 *str = (unsigned char)value;
107 if (str) {
108 *str++ = (unsigned char)(((value >> 6) & 0x1f) | 0xc0);
109 *str = (unsigned char)((value & 0x3f) | 0x80);
118 if (str) {
119 *str++ = (unsigned char)(((value >> 12) & 0xf) | 0xe0);
120 *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
121 *str = (unsigned char)((value & 0x3f) | 0x80);
128 if (str) {
129 *str++ = (unsigned char)(((value >> 18) & 0x7) | 0xf0);
130 *str++ = (unsigned char)(((value >> 12) & 0x3f) | 0x80);
131 *str++ = (unsigned char)(((value >> 6) & 0x3f) | 0x80);
132 *str = (unsigned char)((value & 0x3f) | 0x80);