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