3 * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
8 * Locale-specific 1-byte character versions
9 * See utf-8.c for UTF-8 versions
14 #include <ac/stdlib.h>
15 #include <ac/string.h>
22 #if defined ( HAVE_STRSPN )
23 #define int_strspn strspn
25 static int int_strspn( const char *str, const char *delim )
30 for( pos=0; (*str) ; pos++,str++) {
32 for( p=delim; (*p) ; p++ ) {
47 #if defined( HAVE_STRPBRK )
48 #define int_strpbrk strpbrk
50 static char *(int_strpbrk)( const char *str, const char *accept )
54 for( ; (*str) ; str++ ) {
55 for( p=accept; (*p) ; p++) {
66 char *(ldap_pvt_strtok)( char *str, const char *delim, char **pos )
82 /* skip any initial delimiters */
83 str += int_strspn( str, delim );
88 p = int_strpbrk( str, delim );
101 ldap_pvt_str2upper( char *str )
106 for ( s = str; *s; s++ ) {
107 *s = TOUPPER( (unsigned char) *s );
114 ldap_pvt_str2lower( char *str )
119 for ( s = str; *s; s++ ) {
120 *s = TOLOWER( (unsigned char) *s );