diff options
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); +} |