summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/string.c b/string.c
index 18428527d..c4d3e8371 100644
--- a/string.c
+++ b/string.c
@@ -4,6 +4,9 @@
#include "string.h"
#include <stdarg.h>
+#if defined(UNIX) || defined(__OS2__)
+#include <ctype.h> // required for tolower()
+#endif
void ttd_strlcat(char *dst, const char *src, size_t size)
{
@@ -63,3 +66,8 @@ void str_validate(char *str)
for (; *str != '\0'; str++)
if (!IsValidAsciiChar(*str)) *str = '?';
}
+
+void strtolower(char *str)
+{
+ for (; *str != '\0'; str++) *str = tolower(*str);
+}