cdb_datalen(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_datalen β€” get length of data πŸ’–

okay bestie, welcome to cdb_datalen(3), living cozy in the Library Functions Manual ✨ this one's a lil baby function but it's so useful, i promise 🫢


🌸 NAME 🌸

cdb_datalen β€” get length of data

like. that's it. that's the job. and it ate πŸ’…


✨ SYNTAX ✨

first things first, you gotta invite the header in:

#include <libowfat/cdb.h>

unsigned int cdb_datalen(struct cdb *c);

yes queen, one lil struct cdb * and you're in πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: cdb_datalen returns the length of the data associated with the last key you looked up β€” and by "looked up" i mean you used cdb_find or cdb_findnext πŸŽ€

that's the whole thing. it's giving "how big is this data tho" and it tells you, no cap πŸ”₯

heads up bestie: this only knows about the last key you looked up. it's not out here remembering your whole search history, it's very much living in the moment πŸ’€

and if you also wanna know where that data actually lives? that's a whole different function, and it's literally right here: use cdb_datapos to get the position of the data πŸ“

so the dream team is:

  • cdb_datalen β†’ how long is it
  • cdb_datapos β†’ where is it

iconic duo, fr fr 🌈


πŸ’œ SEE ALSO πŸ’œ

go read these next, they're all in the same friend group:


and that's the page!! this lil cutie comes to you straight out of the Library Functions Manual, part of libowfat's little cdb family 🧚 mwah, go read cdb_datapos(3) next bestie, ily, bye πŸ’–βœ¨πŸŽ€