Commit aa934d06 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

We'll need ldap_utf8_strpbrk() as well.

parent 4e3c4d8c
......@@ -526,6 +526,7 @@ LIBLDAP_F (int) ldap_utf8_isspace( const char * );
LIBLDAP_F (ber_len_t) ldap_utf8_strcspn( const char* str, const char *set);
LIBLDAP_F (ber_len_t) ldap_utf8_strspn( const char* str, const char *set);
LIBLDAP_F (char *) ldap_utf8_strpbrk( const char* str, const char *set);
LIBLDAP_F (char*) ldap_utf8_strtok( char* sp, const char* sep, char **last);
LDAP_END_DECL
......
......@@ -380,6 +380,30 @@ ber_len_t (ldap_utf8_strspn)( const char *str, const char *set )
return cstr - str;
}
char *(ldap_utf8_strpbrk)( const char *str, const char *set )
{
int len;
const char *cstr;
for( cstr = str; *cstr != '\0'; cstr += len ) {
const char *cset;
for( cset = set; ; cset += len ) {
if( ldap_utf8_to_ucs4( cstr ) == ldap_utf8_to_ucs4( cset ) ) {
return cstr;
}
len = ldap_utf8_charlen(cset);
if( !len ) break;
}
len = ldap_utf8_charlen(cstr);
if( !len ) break;
}
return NULL;
}
char *(ldap_utf8_strtok)(char *str, const char *sep, char **last)
{
char *begin;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment