stralloc_diffs(3)
π NAME π
okay so bestie, <pink>stralloc_diffs</pink> β it's literally a compare-two-strallocs situation. that's the whole job. she compares, she vibes, she tells you who's bigger. π¦
β¨ SYNTAX β¨
#include <libowfat/stralloc.h>
int stralloc_diff(const stralloc* a,const stralloc* b);
yes the page is calledstralloc_diffsand the function is calledstralloc_diff. no i will not be explaining that. it's giving legacy naming, and we respect her π
πΈ DESCRIPTION πΈ
so stralloc_diff hands you back a negative number, a 0, or a positive number β and which one you get depends entirely on the vibe check between a and b:
- negative β
ais lexicographically smaller than the stringb 0β they're equal, twins, matching, periodt- positive β
ais lexicographically greater than the stringb
lexicographic comparison, if you're new here, is the "dictionary order" thing β but for bytes. it's not deep, it's not mysterious, it's just a ranking. π
π RETURN VALUE π
okay here's the whole tea, in one line:
<0ifa<b0ifa==b>0ifa>b
that's it. that's the entire return contract. no in-between, no drama, no "it depends" β just less-than, equal, greater-than. iconic behaviour honestly. β¨
π SEE ALSO π
and that's the whole page, bestie!! π«Ά this was stralloc_diffs(3) from the Library Functions Manual, section 3 β literally just the one footer line, stralloc_diffs(3), no version, no date, no extra credits, so we're keeping it cute and keeping it exact. go forth and compare your strallocs responsibly. mwah ππ
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms