EC_HTABLE_HAS_KEY(3)

✨ EC_HTABLE_HAS_KEY ✨

okay bestie, welcome to the ec_htable_has_key page from the Libecoli Programmer's Manual πŸ’– this one is short and sweet and honestly? iconic. it does exactly one (1) thing and it does it flawlessly.


🌸 NAME 🌸

ec_htable_has_key β€” bestie, this is the lil check that asks: does this hash table contain this key or not?? πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <ecoli/htable.h>

bool ec_htable_has_key(
    const struct ec_htable   *htable,   /* The hash table. */
    const void               *key,      /* The key. */
    size_t                    key_len   /* The key length. */
);

so the way this works is you hand it three things and it just tells you yes or no. no drama, no side quests, no notes. πŸ¦‹

  • the htable β€” that's your hash table, the main character. you pass it as const struct ec_htable *.
  • the key β€” that's the key you're looking for, a const void *, so it can literally be anything, we don't judge πŸ’…
  • the key_len β€” the length of that key, as a size_t, because the table can't read your mind and it needs to know how many bytes we're talking about fr fr

🌈 RETURN VALUE 🌈

it returns true if it contains the key, else false. that's it. that's the whole vibe check. πŸ’€βœ¨

not me checking a key and getting a plain old bool back β€” no error codes, no surprises, just truth. we love a low-stakes icon.

πŸ’œ SEE ALSO πŸ’œ

squad goals, here's the whole friend group:


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.


and that's the whole page, bestie 🫢 this one came straight out of the libecoli manual, dated 2026-06-11, and it's giving ✨ short ✨ simple ✨ slay ✨. go check your keys, queen πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from