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);
76 * copy at most maxlength bytes of whole utf8 characters to dest from the
83 ucs2_as_utf8(u8 *dest, const ucs2_char_t *src, unsigned long maxlength)
87 unsigned long limit = ucs2_strnlen(src, maxlength);
89 for (i = 0; maxlength && i < limit; i++) {
93 if (maxlength < 3)
95 maxlength -= 3;
100 if (maxlength < 2)
102 maxlength -= 2;
106 maxlength -= 1;
110 if (maxlength)