Tidy up util
[openafs.git] / src / util / casestrcpy.c
index b715ee8..c9e038f 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID
-    ("$Header$");
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 #include <ctype.h>
 #include <stddef.h>
 #include <stdarg.h>
@@ -67,6 +59,28 @@ ucstring(char *d, char *s, int n)
     return original_d;
 }
 
+void
+stolower(char *s)
+{
+  while (*s) {
+        if (isupper(*s))
+            *s = tolower(*s);
+        s++;
+    }
+    return;
+}
+
+void
+stoupper(char *s)
+{
+  while (*s) {
+        if (islower(*s))
+            *s = toupper(*s);
+        s++;
+    }
+    return;
+}
+
 /* strcompose - concatenate strings passed to it.
  * Input: 
  *   buf: storage for the composed string. Any data in it will be lost.