Lines Matching defs:str
129 unsigned Utf8::EncodeOneByte(char* str, uint8_t c) {
132 str[0] = c;
135 str[0] = 0xC0 | (c >> 6);
136 str[1] = 0x80 | (c & kMask);
140 // Encode encodes the UTF-16 code units c and previous into the given str
144 unsigned Utf8::Encode(char* str, uchar c, int previous, bool replace_invalid) {
147 str[0] = c;
150 str[0] = 0xC0 | (c >> 6);
151 str[1] = 0x80 | (c & kMask);
157 return Encode(str - kUnmatchedSize,
165 str[0] = 0xE0 | (c >> 12);
166 str[1] = 0x80 | ((c >> 6) & kMask);
167 str[2] = 0x80 | (c & kMask);
170 str[0] = 0xF0 | (c >> 18);
171 str[1] = 0x80 | ((c >> 12) & kMask);
172 str[2] = 0x80 | ((c >> 6) & kMask);
173 str[3] = 0x80 | (c & kMask);