add keys fn.
parent
95201ffcd1
commit
35b15b9481
|
@ -108,6 +108,15 @@ pub fn (m mut map) sort() {
|
||||||
m.is_sorted = true
|
m.is_sorted = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn (m map) keys() []string {
|
||||||
|
mut keys := []string{}
|
||||||
|
for i := 0; i < m.entries.len; i++ {
|
||||||
|
entry := m.entries[i]
|
||||||
|
keys << entry.key
|
||||||
|
}
|
||||||
|
return keys
|
||||||
|
}
|
||||||
|
|
||||||
fn (m map) get(key string, out voidptr) bool {
|
fn (m map) get(key string, out voidptr) bool {
|
||||||
if m.is_sorted {
|
if m.is_sorted {
|
||||||
// println('\n\nget "$key" sorted')
|
// println('\n\nget "$key" sorted')
|
||||||
|
|
Loading…
Reference in New Issue