V Forum

[ log in ]

Find number of map elements

ComradeSparklePony Jul 11 07:36
How to find number of map elements in V Language?

For example

mut m := map[string]int
m['one'] = 1
m['two'] = 2
ComradeSparklePony Jul 11 07:36
I've tried len(m) and m.len() but no luck
aruniiird Jul 14 07:12
Try `m.len` (like a member variable, not as a function)



Powered by Vorum, open-source blogging/forum software written in V