... | ... |
@@ -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 | 45 |
#include <sys/time.h> |
45 | 46 |
#include <limits.h> |
46 | 47 |
#include <unistd.h> |
48 |
+#include <ctype.h> |
|
47 | 49 |
|
48 | 50 |
#include "config.h" |
49 | 51 |
#include "dprint.h" |
... | ... |
@@ -357,4 +359,18 @@ error: |
357 | 359 |
return -1; |
358 | 360 |
} |
359 | 361 |
|
362 |
+ |
|
363 |
+/* |
|
364 |
+ * Convert a string to lower case |
|
365 |
+ */ |
|
366 |
+static inline void strlower(str* _s) |
|
367 |
+{ |
|
368 |
+ int i; |
|
369 |
+ |
|
370 |
+ for(i = 0; i < _s->len; i++) { |
|
371 |
+ _s->s[i] = tolower(_s->s[i]); |
|
372 |
+ } |
|
373 |
+} |
|
374 |
+ |
|
375 |
+ |
|
360 | 376 |
#endif |