summaryrefslogtreecommitdiff
path: root/src/libstddjb/case_lowerb.c
blob: 66284dfad8f4d2c86214ba35f2839b7e0d3cefb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <skalibs/bytestr.h>

void case_lowerb (char *s, size_t len)
{
  unsigned char const d = 'a' - 'A' ;
  while (len--)
  {
    if (('A' <= *s) && (*s <= 'Z')) *s += d ;
    ++s ;
  }
}