Return the number of UTF-8 characters (not bytes) in a null-terminated UTF-8 string.
#include <ldap_utf8.h>
ber_len_t ldap_x_utf8_chars (
const char *p);
(IN) Contains the null-terminated UTF-8 string to count.
Number of chars (not bytes) in p.
/* String with 4 UTF-8 characters */
char utstr[] = { 0xe2U, 0x98U, 0xa0U, ’a’, ’b’, ’c’, 0 };
int n = ldap_x_utf8_chars(utstr); /* Returns 4 */