---
name: "case"
section: "3"
platform: "linux"
package: "qmail"
version: "1.06-6.2~deb10u1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/case/3"
---

# case(3)

convert ASCII uppercase bytes to lowercase

## NAME

case - convert ASCII uppercase bytes to lowercase

## SYNTAX

**#include \<case.h\>**

void **case\_lowers**(*s*);\
 void **case\_lowerb**(*s*,*len*);

int **case\_diffs**(*s*,*t*);\
 int **case\_equals**(*s*,*t*);\
 int **case\_starts**(*s*,*t*);

int **case\_diffb**(*s*,*len*,*t*);\
 int **case\_startb**(*s*,*len*,*t*);

char \**s*;\
 char \**t*;\
 unsigned int *len*;

## DESCRIPTION

**case\_lowers** converts each uppercase byte in the string *s* to lowercase. *s* must be 0-terminated.

**case\_lowerb** converts each uppercase byte in the buffer *s*, of length *len*, to lowercase.

**case\_diffs** lexicographically compares lowercase versions of the strings *s* and *t*. It returns something positive, negative, or zero when the first is larger than, smaller than, or equal to the second. *s* and *t* must be 0-terminated.

**case\_equals** means **!case\_diffs**.

**case\_starts** returns 1 if a lowercase version of *s* starts with a lowercase version of *t*. *s* and *t* must be 0-terminated.

**case\_diffb** lexicographically compares lowercase versions of the buffers *s* and *t*, each of length *len*. It returns something positive, negative, or zero when the first is larger than, smaller than, or equal to the second.

**case\_startb** returns 1 if a lowercase version of the buffer *s*, of length *len*, starts with a lowercase version of the string *t*. *t* must be 0-terminated.

The **case** routines are ASCII-specific. They are suitable for programs that handle case-independent networking protocols.

All comparisons are performed on unsigned bytes.

## SEE ALSO

[byte\_diff(3)](/byte_diff/3.md), [byte\_equal(3)](/byte_equal/3.md), [str\_diff(3)](/str_diff/3.md), [str\_equal(3)](/str_equal/3.md), [str\_start(3)](/str_start/3.md)
