DArray.length

Gives the length of the array.

  1. size_t length [@property getter]
    struct DArray(T)
    pragma(inline, true) @property
    size_t
    length
    const pure @nogc nothrow
    (
    )
  2. bool empty [@property getter]

Examples

1 DArray!(int) fsa;
2 assert(fsa.empty);
3 assert(fsa.length == 0);
4 
5 fsa.insertBack(1337);
6 fsa.insertBack(1338);
7 
8 assert(fsa.length == 2);
9 assert(!fsa.empty);

Meta