lib/unicode.c
/* Returns the number of Unicode characters in UTF-8 string 's'. */
Returns the number of Unicode characters in UTF-8 string 's'.
Returns the number of Unicode characters in UTF - 8 string ' s ' .
size_t
utf8_length(const char *s_)
{
    const uint8_t *s;
    size_t length;
    length = 0;
    for (s = (const uint8_t *) s_; *s != '\0'; s++) {
        length += (*s & 0xc0) != 0x80;
    }
    return length;
}
size_t utf8_length ( const char * s_ ) { const uint8_t * s ; size_t length ; length = 0 ; for ( s = ( const uint8_t * ) s_ ; * s != ' \0 ' ; s ++ ) { length += ( * s & 0xc0 ) != 0x80 ; } return length ; }
Returns the number of Unicode characters in UTF-8 string 's'.
Returns the number of Unicode characters in UTF - 8 string ' s ' .
/* The most-significant bits of the first byte in a character are one
         * of 2#01, 2#00, or 2#11.  2#10 is a continuation byte. */