Browse code

strlower moved from registrar.

Jan Janak authored on 13/02/2003 21:01:23
Showing 1 changed files
... ...
@@ -28,6 +28,7 @@
28 28
  *
29 29
  * History
30 30
  * ------
31
+ * 2003-02-13 strlower added (janakj)
31 32
  * 2003-01-29 pathmax added (jiri)
32 33
  * 2003-01-28 scratchpad removed (jiri)
33 34
  * 2003-01-18 un_escape function introduced for convenience of code needing
... ...
@@ -44,6 +45,7 @@
44 44
 #include <sys/time.h>
45 45
 #include <limits.h>
46 46
 #include <unistd.h>
47
+#include <ctype.h>
47 48
 
48 49
 #include "config.h"
49 50
 #include "dprint.h"
... ...
@@ -357,4 +359,18 @@ error:
357 357
 	return -1;
358 358
 } 
359 359
 
360
+
361
+/*
362
+ * Convert a string to lower case
363
+ */
364
+static inline void strlower(str* _s)
365
+{
366
+	int i;
367
+
368
+	for(i = 0; i < _s->len; i++) {
369
+		_s->s[i] = tolower(_s->s[i]);
370
+	}
371
+}
372
+
373
+
360 374
 #endif