#include <ucw/unaligned.h>
+#ifdef CONFIG_UCW_CLEAN_ABI
+#define utf8_strlen ucw_utf8_strlen
+#define utf8_strnlen ucw_utf8_strnlen
+#endif
+
/* Macros for handling UTF-8 */
#define UNI_REPLACEMENT 0xfffc /** Unicode value used as a default replacement of invalid characters. **/
* Count the number of Unicode characters in a zero-terminated UTF-8 string.
* Returned value for corrupted encoding is undefined, but is never greater than strlen().
**/
-uns utf8_strlen(const byte *str);
+size_t utf8_strlen(const byte *str);
/**
* Same as @utf8_strlen(), but returns at most @n characters.
**/
-uns utf8_strnlen(const byte *str, uns n);
+size_t utf8_strnlen(const byte *str, size_t n);
#endif