mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-09-22 04:15:54 -04:00
Feature: Added function to lowercase a string
This commit is contained in:
parent
4e69f55410
commit
f2c474ec63
12
src/util.c
12
src/util.c
@ -17,6 +17,7 @@
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@ -1450,3 +1451,14 @@ int replace_string(char **dst, const char *src)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int util_strtolower(char *str)
|
||||
{
|
||||
if (!str)
|
||||
return -1;
|
||||
|
||||
for (; *str; str++)
|
||||
*str = tolower(*str);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -130,4 +130,5 @@ char *util_conv_string (const char *string, const char *in_charset, const char *
|
||||
int get_line(FILE *file, char *buf, size_t siz);
|
||||
|
||||
int replace_string(char **dst, const char *src);
|
||||
int util_strtolower(char *str);
|
||||
#endif /* __UTIL_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user