]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/string.c
remove lint
[openldap] / libraries / libldap / string.c
index e91aba146f26aaa9887f729980db9795b9626680..21598fe004efb8858ba32764014593a5728e5dc6 100644 (file)
@@ -1,13 +1,20 @@
+/* $OpenLDAP$ */
 /*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
+/*
+ * Locale-specific 1-byte character versions
+ * See utf-8.c for UTF-8 versions
+ */
+
 #include "portable.h"
 
 #include <ac/stdlib.h>
 #include <ac/string.h>
 #include <ac/time.h>
+#include <ac/ctype.h>
 
 #include "ldap-int.h"
 
@@ -102,4 +109,30 @@ char *
 
        memcpy( p, s, len );
        return( p );
-}
\ No newline at end of file
+}
+
+char *
+ldap_pvt_str2upper( char *str )
+{
+       char    *s;
+
+       /* to upper */
+       for ( s = str; *s; s++ ) {
+               *s = TOUPPER( (unsigned char) *s );
+       }
+
+       return( str );
+}
+
+char *
+ldap_pvt_str2lower( char *str )
+{
+       char    *s;
+
+       /* to lower */
+       for ( s = str; *s; s++ ) {
+               *s = TOLOWER( (unsigned char) *s );
+       }
+
+       return( str );
+}