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

#include <sys/types.h>
#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 ;
  }
}