]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/string.c
Update for new password codes for MSVC5
[openldap] / libraries / libldap / string.c
index 9952f8b7bb08924f89fb90795cffe9bf1f152151..cd9994ad0601a6ae96c145bd5ad84f42521e3330 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
@@ -5,9 +6,10 @@
 
 #include "portable.h"
 
-#include <stdlib.h>
+#include <ac/stdlib.h>
 #include <ac/string.h>
 #include <ac/time.h>
+#include <ac/ctype.h>
 
 #include "ldap-int.h"
 
@@ -103,3 +105,29 @@ char *
        memcpy( p, s, len );
        return( p );
 }
+
+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 );
+}