C Collections

cstring · Section 3

cstring_to_lower

cstring_to_lower - convert the ASCII letters to lowercase in-place

C Collections (libccollections, -lccollections)

#include <ccollections/cstring.h>
 
void cstring_to_lower(cstr s);

This function turns every ASCII upper-case letter of the string into lower
case, in place, and leaves every other byte as it is.

s   String to change

Only the bytes 'A' to 'Z' change, and the locale plays no part, so the
result is the same in every locale (a Turkish one included). A byte above
0x7F never changes, which keeps a UTF-8 string valid UTF-8
Asserts if s is NULL

cstring_to_upper(3)