EC_DICT_HAS_KEY(3)

πŸ’– EC_DICT_HAS_KEY πŸ’–

okay bestie, so this is a page from the Libecoli Programmer's Manual β€” it's EC_DICT_HAS_KEY(3) and it's genuinely so simple it's giving "one job and she does it" energy. ✨


✨ NAME ✨

ec_dict_has_key β€” check if the hash table contains this key. that's it. that's the whole gig. πŸŽ€


🌸 SYNOPSIS 🌸

#include <ecoli/dict.h>

bool ec_dict_has_key(
    const struct ec_dict   *dict,  /* The hash table. */
    const char             *key    /* The key string. Must not be NULL. */
);

so you're passing in a dict β€” that's your hash table, she's the main character here πŸ‘‘ β€” and a key, which is the key string, and heads up bestie, it must not be NULL. like, at all. 🫢


πŸ¦‹ RETURN VALUE πŸ¦‹

  • Returns true if it contains the key πŸ’…
  • Returns false otherwise
  • If key is NULL, false is returned and errno is set to EINVAL β€” so if you handed her a NULL key, she's not throwing hands, she's just politely saying "no" and filing a lil note in errno about it 😭

🌈 SEE ALSO 🌈

the whole squad, fr fr β€” go read these too:


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


lowkey iconic of them to keep this maintained since 2010 ngl 🧚

and that's the vibe check, bestie β€” this came out of libecoli and the date on it is 2026-06-11. slay, go check your keys. πŸ’–πŸ’…β­

πŸ“¦ where this page comes from