1array_length(3) Library Functions Manual array_length(3)
2
3
4
6 array_length - get number of allocated members in array
7
9 #include <array.h>
10
11 int64 array_length(array* x,uint64 membersize);
12
13 array x;
14 int64 members = array_length(&x,sizeof(t));
15
16
18 array_length returns the number of initialized bytes in x, divided by
19 the size of t. In other words, array_get will succeed for positions 0
20 through array_length-1; it will fail for position array_length.
21
22 If x is unallocated, array_length and array_bytes return 0.
23
25 array_allocate(3), array_get(3), array_fail(3), array_bytes(3)
26
27
28
29 array_length(3)