Lines Matching defs:length
142 bool utf8_is_printable_newline(const char* str, size_t length, bool newline) {
147 for (p = (const uint8_t*) str; length;) {
152 (size_t) encoded_len > length)
161 length -= encoded_len;
186 * The length of the character is returned. It is not zero-terminated! If the
187 * output buffer is NULL, only the length is returned.
189 * Returns: The length in bytes that the UTF-8 representation does or would
224 char *utf16_to_utf8(const void *s, size_t length) {
228 r = new(char, (length * 4 + 1) / 2 + 1);
235 while (f < (const uint8_t*) s + length) {
251 else if (f >= (const uint8_t*) s + length)
286 /* validate one encoded unicode char and return its length */
307 /* check if encoded length matches encoded value */