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:
8
string.c
8
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user