LC_KEYRING_HAS(3)

πŸ’– LC_KEYRING_HAS(3) πŸ’–

okay bestie, so this is a page from the Librecast Programmer's Manual β€” yes, the liblibrecast one β€” and it's about the lil function that goes digging through your keyring to see if a key is in there. it's lc_keyring_has, she's short, she's sweet, she's giving "yes or no ma'am" energy. let's get into it 🫢


🌸 NAME 🌸

lc_keyring_has β€” search keyring for key πŸ”

πŸ“š LIBRARY πŸ“š

Librecast library (liblibrecast, -llibrecast) ✨

πŸŽ€ SYNOPSIS πŸŽ€

#include <librecast/key.h>

int lc_keyring_has(lc_keyring_t *keyring, uint8_t *key);

Compile and link with -llibrecast. no cap, that flag is not optional πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

Searches keyring for key. that's it. that's the whole vibe. it takes your keyring and your key and it goes rummaging, like you digging through your bag for your lip gloss, except it's actually organized and finds things 🌈

⭐ RETURN VALUE ⭐

okay this is the part where you gotta pay attention because the numbers are doing a little bit of a troll move, and it's iconic but also unhinged, so listen:

  • lc_keyring_has() returns -1 if key is found on keyring πŸ‘‘
  • or 0 if it is not found πŸ’€

yes bestie. negative one means YES. zero means NO. it's giving "the call is coming from inside the house" logic but we love her anyway and we respect her choices. just don't assume it works like a normal boolean, fr fr πŸ™ˆ

😭 ERRORS 😭

None. not a single one. she's unproblematic, she's low maintenance, she has never once caused drama. periodt ✨

πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, my love πŸ’œ this little cutie comes to you from LIBRECAST, dated 2025-04-02, filed under LC_KEYRING_HAS(3) β€” go forth and check your keys, and remember: -1 means found. stay slay. bye πŸŽ€πŸ’–

πŸ“¦ where this page comes from