cdb_keylen(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ cdb_keylen β€” get the length of a key πŸ’…

okay bestie, so this one lives in section 3 of the Library Functions Manual, and it's literally one of the cdb girlies. no cap.


🌸 SYNTAX 🌸

#include <libowfat/cdb.h>

unsigned int cdb_keylen(struct cdb *c);

that's it. that's the whole vibe. one include, one function, one struct cdb * argument named c. πŸŽ€


πŸ’– DESCRIPTION πŸ’–

so you're out here iterating through your cdb database, right? and you called cdb_firstkey or cdb_nextkey, and one of them found you a key. iconic. 🫢

cdb_keylen returns the length of that key β€” the one cdb_firstkey or cdb_nextkey found.

that's the whole job. it's giving "measurement queen". it does not hand you the key itself, it does not hand you a pointer, it just tells you how long the thing is. lowkey the most unbothered function in the library. ✨

and if you want to know where that key actually sits? that's not this function's business, bestie. that's cdb_keypos. use that one to get the position of the key. πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

  • cdb_keypos(3)
  • cdb_datalen(3)
  • cdb_datapos(3)

like, go read those too. they're the rest of the friend group. the key length girlie, the key position girlie, the data length girlie and the data position girlie. a whole squad. 🌈


⭐ cute lil sign-off ⭐

and that's the tea πŸ“ β€” cdb_keylen comes to you straight from the Library Functions Manual, section 3 (cdb_keylen(3)), and it's out here doing exactly one thing and doing it flawlessly. periodt. πŸ‘‘

stay hydrated, call cdb_keypos when you need coordinates, and remember: length is a number, position is a place, and you deserve both. πŸ’œπŸ§š