Find the previous character in a UTF-8 string.
#include <ldap_utf8.h>
char* ldap_x_utf8_prev (
const char *p);
(IN) Points to a UTF-8 string.
Returns a pointer to the previous character in the string.
The application must take care not to step beyond the beginning of the string.
char utstr[] = { 0xe2U, 0x98U, 0xa0U, ’a’, ’b’, ’c’, 0 };
char *p = ldap_x_utf8_prev(utstr+4); /* p now points to the ’a’ char */
p = ldap_x_utf8_prev(p); /* p now points to the beginning char */