Re: Speeding up 'dictionary' search
- Posted by ghaberek (admin) Jul 20, 2016
- 1387 views
This is exactly what a map is for.
include std/map.e map my_dict = map:new() -- store some data map:put( my_dict, "key", "value" ) if map:has( my_dict, "key" ) then -- the key exists -- get some data object value = map:get( my_dict, "key" ) end if
-Greg