var.length

size_t length() @property const @safe

Get the number of elements when the value holds an array.

Returns 0 for Type.NULL.