C Collections

cstring · Section 3

cstring_to_upper

cstring_to_upper - convert the ASCII letters to uppercase in-place

C Collections (libccollections, -lccollections)

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

This function turns every ASCII lower-case letter of the string into upper
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_lower(3)