diff options
| -rw-r--r-- | xmake/core/base/table.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua index 27e6ecb3c..9fb64b114 100644 --- a/xmake/core/base/table.lua +++ b/xmake/core/base/table.lua @@ -309,6 +309,13 @@ function table.keys(tab) return keyset, n end +-- get order keys of a table +function table.orderkeys(tab) + local keys = table.keys(tab) + table.sort(keys) + return keys +end + -- get values of a table function table.values(tab) |
