streq(3)
π streq β strings equal π
okay bestie, so we're doing streq(3) today, from the Library Functions Manual, and honestly? it's giving short king. it's from gnulib β The GNU Portability Library π§ and it does exactly one thing and does it flawlessly. we love a focused icon. π
β¨ NAME β¨
streq β strings equal. that's it, that's the whole name. no notes. π
πΈ LIBRARY πΈ
bestie this lives in gnulib β The GNU Portability Library. the portability queen herself. π«Ά
π SYNOPSIS π
#include <string.h>
bool streq(const char *s1, const char *s2);
literally two lines. two little arguments, one little bool. so cute. π
π¦ DESCRIPTION π¦
so streq() figures out whether the strings s1 and s2 are equal β and it does it as if by calling memeq(3). like, same energy, same result, no cap. π₯
and it's equivalent to both of these expressions, okay? both of them. not one, not the other, BOTH:
strcmp(s1, s2) == 0
memeq(s1, s2, MIN(strlen(s1),strlen(s2))+1)
the way that second one has MIN(strlen(s1),strlen(s2))+1 in it is honestly so extra of it and i respect that so much. πβ¨
π RETURN VALUE π
ngl, the answer is just: see memeq(3). that's the whole vibe check. the manpage is not gonna hold your hand on this one bestie, it's pointing you at its sibling. ππ
π ATTRIBUTES π
if you wanna know what any of these fancy words even mean, go check attributes(7) β the original says that fr fr. and here's the tea on streq() itself:
- Interface:
streq() - Attribute: Thread safety
- Value:
MT-Safe
so basically it's thread-safe, she can hang with the whole group chat at once and never gets messy. multitasking main character. π β¨
β STANDARDS β
GNU. periodt.
π HISTORY π
gnulib 202601. that's when it showed up, iconic behavior, born ready. π
π SEE ALSO π
and that's the whole page!! π₯³ go be equal, go be MT-Safe, go be everything. this lil beauty came to you courtesy of Linux man-pages 6.20, dated 2026-08-10 β so when you cite it in your essay, that's the receipts bestie. mwah!! ππβ¨π¦πΈ
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms