STREQL(3)

πŸ“¦
version 2022.10.16 Β· 2 versions
, in opensuse-leap 16.0

πŸ’– STREQL(3) β€” streql() πŸ’–

okay so this little icon is from SchilyΒ΄s LIBRARY FUNCTIONS, and it's literally just one tiny function doing one tiny job. No cap. πŸ’…

🌸 NAME 🌸

streql() β€” compares two strings for equality. That's it. That's the whole assignment. 🫢

✨ SYNOPSIS ✨

BOOL streql(s1,s2)
            char *s1, *s2;

πŸ¦‹ DESCRIPTION πŸ¦‹

streql() checks two strings for equality. Like, are they the same? It's giving "are we twins or not" energy. πŸŽ€

πŸ’œ RETURNS πŸ’œ

  • Returns TRUE if the string s1 is the same length and has the same characters as s2.
  • Otherwise, returns FALSE.

So yeah β€” same length plus same characters = slay. Anything else = nope. 😭

πŸŽ€ NOTES πŸŽ€

When comparing two strings, the strings are not considered equal if one has padding (extra spaces).

Translation: extra spaces are a vibe killer here. Padding means not equal, periodt. πŸ™ˆ


mwah πŸ’‹ β€” this page is from SchilyΒ΄s LIBRARY FUNCTIONS, page STREQL(3), written by Joerg Schilling, dated 2022/09/09. ✨

πŸ“¦ where this page comes from