mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
add function to change strings to lowercase
This commit is contained in:
parent
0f08220434
commit
d2329cf192
@ -36,6 +36,8 @@ bool string_is_empty(const char *data);
|
||||
|
||||
char *string_to_upper(char *s);
|
||||
|
||||
char *string_to_lower(char *s);
|
||||
|
||||
char *string_replace_substring(const char *in, const char *pattern,
|
||||
const char *by);
|
||||
|
||||
|
@ -45,6 +45,14 @@ char *string_to_upper(char *s)
|
||||
return s;
|
||||
}
|
||||
|
||||
char *string_to_lower(char *s)
|
||||
{
|
||||
unsigned char *ucs = (unsigned char *)s;
|
||||
for ( ; *ucs != '\0'; ucs++)
|
||||
*ucs = tolower(*ucs);
|
||||
return s;
|
||||
}
|
||||
|
||||
char *string_replace_substring(const char *in, const char *pattern, const char *replacement)
|
||||
{
|
||||
char *needle = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user