mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-29 15:43:56 +00:00
Add str_tolower_inplace() function
This commit is contained in:
parent
95e45f452e
commit
1a413b72db
8
str.c
8
str.c
@ -123,6 +123,14 @@ char *str_toupper_inplace(char *str)
|
||||
return str;
|
||||
}
|
||||
|
||||
char *str_tolower_inplace(char *str)
|
||||
{
|
||||
register char *s;
|
||||
for (s = str; *s; ++s)
|
||||
*s = tolower(*s);
|
||||
return str;
|
||||
}
|
||||
|
||||
const char *strnchr(const char *s, size_t n, char c)
|
||||
{
|
||||
for (; n; --n, ++s) {
|
||||
|
2
str.h
2
str.h
@ -92,7 +92,9 @@ __STR_INLINE int hexvalue(char c)
|
||||
}
|
||||
|
||||
int is_all_matching(const unsigned char *ptr, size_t len, unsigned char value);
|
||||
|
||||
char *str_toupper_inplace(char *s);
|
||||
char *str_tolower_inplace(char *s);
|
||||
|
||||
char *toprint(char *dstStr, ssize_t dstBufSiz, const char *srcBuf, size_t srcBytes, const char quotes[2]);
|
||||
char *toprint_str(char *dstStr, ssize_t dstBufSiz, const char *srcStr, const char quotes[2]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user