Lines Matching refs:ucs1
82 static inline wchar_t *UniStrcat(wchar_t *ucs1, const wchar_t *ucs2) in UniStrcat() argument
84 wchar_t *anchor = ucs1; /* save a pointer to start of ucs1 */ in UniStrcat()
86 while (*ucs1++) in UniStrcat()
88 ucs1--; /* Return to the null */ in UniStrcat()
89 while ((*ucs1++ = *ucs2++)) in UniStrcat()
119 static inline int UniStrcmp(const wchar_t *ucs1, const wchar_t *ucs2) in UniStrcmp() argument
121 while ((*ucs1 == *ucs2) && *ucs1) { in UniStrcmp()
122 ucs1++; in UniStrcmp()
125 return (int)*ucs1 - (int)*ucs2; in UniStrcmp()
131 static inline wchar_t *UniStrcpy(wchar_t *ucs1, const wchar_t *ucs2) in UniStrcpy() argument
133 wchar_t *anchor = ucs1; /* save the start of result string */ in UniStrcpy()
135 while ((*ucs1++ = *ucs2++)) in UniStrcpy()
143 static inline size_t UniStrlen(const wchar_t *ucs1) in UniStrlen() argument
147 while (*ucs1++) in UniStrlen()
156 static inline size_t UniStrnlen(const wchar_t *ucs1, int maxlen) in UniStrnlen() argument
160 while (*ucs1++) { in UniStrnlen()
171 static inline wchar_t *UniStrncat(wchar_t *ucs1, const wchar_t *ucs2, size_t n) in UniStrncat() argument
173 wchar_t *anchor = ucs1; /* save pointer to string 1 */ in UniStrncat()
175 while (*ucs1++) in UniStrncat()
177 ucs1--; /* point to null terminator of s1 */ in UniStrncat()
178 while (n-- && (*ucs1 = *ucs2)) { /* copy s2 after s1 */ in UniStrncat()
179 ucs1++; in UniStrncat()
182 *ucs1 = 0; /* Null terminate the result */ in UniStrncat()
189 static inline int UniStrncmp(const wchar_t *ucs1, const wchar_t *ucs2, size_t n) in UniStrncmp() argument
193 while ((*ucs1 == *ucs2) && *ucs1 && --n) { in UniStrncmp()
194 ucs1++; in UniStrncmp()
197 return (int)*ucs1 - (int)*ucs2; in UniStrncmp()
204 UniStrncmp_le(const wchar_t *ucs1, const wchar_t *ucs2, size_t n) in UniStrncmp_le() argument
208 while ((*ucs1 == __le16_to_cpu(*ucs2)) && *ucs1 && --n) { in UniStrncmp_le()
209 ucs1++; in UniStrncmp_le()
212 return (int)*ucs1 - (int)__le16_to_cpu(*ucs2); in UniStrncmp_le()
218 static inline wchar_t *UniStrncpy(wchar_t *ucs1, const wchar_t *ucs2, size_t n) in UniStrncpy() argument
220 wchar_t *anchor = ucs1; in UniStrncpy()
223 *ucs1++ = *ucs2++; in UniStrncpy()
227 *ucs1++ = 0; in UniStrncpy()
234 static inline wchar_t *UniStrncpy_le(wchar_t *ucs1, const wchar_t *ucs2, size_t n) in UniStrncpy_le() argument
236 wchar_t *anchor = ucs1; in UniStrncpy_le()
239 *ucs1++ = __le16_to_cpu(*ucs2++); in UniStrncpy_le()
243 *ucs1++ = 0; in UniStrncpy_le()
254 static inline wchar_t *UniStrstr(const wchar_t *ucs1, const wchar_t *ucs2) in UniStrstr() argument
256 const wchar_t *anchor1 = ucs1; in UniStrstr()
259 while (*ucs1) { in UniStrstr()
260 if (*ucs1 == *ucs2) { in UniStrstr()
262 ucs1++; in UniStrstr()
267 ucs1 = ++anchor1; /* No match */ in UniStrstr()