diff options
Diffstat (limited to 'src/libstddjb/case_lowers.c')
-rw-r--r-- | src/libstddjb/case_lowers.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libstddjb/case_lowers.c b/src/libstddjb/case_lowers.c new file mode 100644 index 0000000..5999786 --- /dev/null +++ b/src/libstddjb/case_lowers.c @@ -0,0 +1,13 @@ +/* ISC license. */ + +#include <skalibs/bytestr.h> + +void case_lowers (register char *s) +{ + register unsigned char const d = 'a' - 'A' ; + while (*s) + { + if (('A' <= *s) && (*s <= 'Z')) *s += d ; + ++s ; + } +} |