micro-utils/include/mu_strlen.h
2024-07-09 15:43:55 +03:00

14 lines
164 B
C

#ifndef _UTF8_STRLEN
#define _UTF8_STRLEN
static size_t mu_strlen(const char *s) {
size_t i = 0;
while (*s++)
i += (*s & 0xC0) != 0x80;
return i;
}
#endif