SplitScript reference / Map<K, V> / length
Map<K, V>.length
Method
Map<K, V>.length() -> u32 where K: Equatable
Returns the number of stored key-value pairs.
Replacing an existing key does not increase the count.
Effects: pure
Runtime behavior: available everywhere; synchronous
Examples
Count route entries
let routes = Map.new<String, u32>()
routes["Atrium"] = 12
let count = routes.length()