qlibs:(case)
β¨ NAME β¨
case β case independent string manipulation/evaluation π
okay so this is the qlibs:(case) page, and it's literally all about the case crew: a bunch of functions that do string stuff without caring about upper/lowercase. no cap, they're icons.
π SYNTAX π
here's the exact include and the whole function lineup, bestie:
#include "case.h"
void case_lowers(s);
void case_lowerb(s,len);
void case_uppers(s);
void case_upperb(s,len);
int case_diffs(s,t);
int case_equals(s,t);
int case_diffrs(s,t);
int case_equalrs(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 stringsto lowercase.smust be 0-terminated, periodt.case_lowerbβ converts each uppercase byte in the buffers, of lengthlen, to lowercase. buffer behavior, no 0-termination requirement here.case_uppersβ converts each lowercase byte in the stringsto uppercase.smust be 0-terminated.case_upperbβ converts each lowercase byte in the buffers, of lengthlen, to uppercase.case_diffsβ lexicographically compares lowercase versions of the stringssandt. it returns something positive, negative, or zero when the first is larger than, smaller than, or equal to the second.sandtmust be 0-terminated.case_equalsβ means!case_diffs. that's it, that's the whole vibe.case_diffrsandcase_equalrsβ compare strings from right to left instead from left to right. yes, they go the other way, and yes, it's giving main character energy.case_startsβ returns1if a lowercase version ofsstarts with a lowercase version oft.sandtmust be 0-terminated.case_diffbβ lexicographically compares lowercase versions of the bufferssandt, each of lengthlen. it returns something positive, negative, or zero when the first is larger than, smaller than, or equal to the second.case_startbβ returns1if a lowercase version of the buffers, of lengthlen, starts with a lowercase version of the stringt.tmust be 0-terminated.
the case routines are ASCII-specific. they're suitable for programs that handle case-independent networking protocols. all comparisons are performed on unsigned bytes β that's lowkey important, so don't forget it π«Ά
π SEE ALSO π
and that's the page!! footer vibes: section 3, qlibs:(case) β source/version and date included, bestie, we didn't skip a single byte πβ¨π
π¦ where this page comes from
- alpine 3.24: fehqlibs-doc 31-r0 Β· Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms