Line 13: |
Line 13: |
| end | | end |
| return true | | return true |
| + | end |
| + | |
| + | function table.getKeys(self) |
| + | local keys = {} |
| + | for k,_ in pairs(self) do |
| + | table.insert(keys,k) |
| + | end |
| + | return keys |
| + | end |
| + | |
| + | function table.getVals(self) |
| + | local vals = {} |
| + | for _,v in pairs(self) do |
| + | table.insert(vals,v) |
| + | end |
| + | return vals |
| end | | end |
| | | |