Function HashTable.length

Returns the number of elements in the container.

size_t length() const @property;

Returns

The number of elements in the container.

Example

HashTable!(string, int) hashTable;
assert(hashTable.length == 0);

hashTable["eight"] = 8;
assert(hashTable.length == 1);