Lines Matching refs:maxlength
7 ucs2_strnlen(const ucs2_char_t *s, size_t maxlength)
11 while (*s++ != 0 && length < maxlength)
29 ucs2_strsize(const ucs2_char_t *data, unsigned long maxlength)
31 return ucs2_strnlen(data, maxlength/sizeof(ucs2_char_t)) * sizeof(ucs2_char_t);
128 * copy at most maxlength bytes of whole utf8 characters to dest from the
135 ucs2_as_utf8(u8 *dest, const ucs2_char_t *src, unsigned long maxlength)
139 unsigned long limit = ucs2_strnlen(src, maxlength);
141 for (i = 0; maxlength && i < limit; i++) {
145 if (maxlength < 3)
147 maxlength -= 3;
152 if (maxlength < 2)
154 maxlength -= 2;
158 maxlength -= 1;
162 if (maxlength)