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