Function empty
Tests whether array is empty.
bool empty(T)
(
scope const T[] array
) @property;
Parameters
Name | Description |
---|---|
T | Element type of array. |
array | Built-in array. |
Returns
true if array has no elements, false otherwise.
Example
int[1] array;
assert(!array .empty);
assert(array[1 .. 1] .empty);