Correct erroneous comment regarding realpath availability
[ciopfs.git] / ascii.c
blob42eb7ae1f79c186dc01bafb99ffbd4430f1689b3
1 #include <ctype.h>
3 static inline bool str_contains_upper(const char *s)
5 while (*s) {
6 if (isupper(*s++))
7 return true;
9 return false;
12 static inline char *str_fold(const char *src)
14 char *t, *dest = malloc(strlen(src) + 1);
15 if (!dest)
16 return NULL;
17 for (t = dest; *src; src++, t++)
18 *t = tolower(*src);
19 *t = '\0';
20 return dest;