array_length(3)
π array_length(3) π
okay so bestie, welcome to the Library Functions Manual section for array_length(3) π«Ά yes we are in our libowfat era β¨
β¨ NAME β¨
array_length β get the number of allocated members in an array π
π SYNTAX π
#include <libowfat/array.h>
int64 array_length(array* x,uint64 membersize);
and like, here's the lil usage moment fr fr:
array x;
int64 members = array_length(&x,sizeof(t));
πΈ DESCRIPTION πΈ
so array_length literally returns the number of initialized bytes in x, divided by the size of t. that's it, that's the whole vibe β¨
in other words? array_get will succeed for positions 0 through array_length-1, and it will fail for position array_length. no cap, that's the boundary, that's the line, that's the cutoff π
π«Ά and ifxis unallocated,array_lengthandarray_bytesboth return0. iconic behaviour honestly.
π SEE ALSO π
mwah π that's a wrap on array_length(3) from the Library Functions Manual β same page name, same section, we just made it cute π go forth and check your array lengths, bestie, ily πβ¨π
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms