1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-24 23:19:09 +00:00

(svn r5684) - Codechange: create an strtolower() function that uses tolower() on a whole string and apply it in the places this was used.

This commit is contained in:
Darkvater
2006-07-31 22:11:34 +00:00
parent 17dc898805
commit cef563141a
4 changed files with 24 additions and 29 deletions

View File

@@ -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);
}