diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-06-22 15:45:51 +0300 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-06-22 15:45:51 +0300 |
commit | bc70af3582b3e9fea540e68be61078603d1db6b1 (patch) | |
tree | 26265b25939b65b81016f12c20cc33e7b971ec5a | |
parent | 1693cdbb92789889587081d883414ecb4979425e (diff) | |
download | luaotfload-bc70af3582b3e9fea540e68be61078603d1db6b1.tar.gz |
Lualibs already defines a table.contains() function
-rw-r--r-- | otfl-font-nms.lua | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index 9ba4f52..7abc62b 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -46,18 +46,6 @@ local trace_progress = true --trackers.register("names.progress", function(v) t local trace_search = false --trackers.register("names.search", function(v) trace_search = v end) local trace_loading = false --trackers.register("names.loading", function(v) trace_loading = v end) - --- Basic function from <http://stackoverflow.com/questions/2282444/how-to-check-if-a-table-contains-an-element-in-lua> -function table.contains(table, element) - for _, value in pairs(table) do - if value == element then - return true - end - end - return false -end - - local function sanitize(str) if str then return utfgsub(lower(str), "[^%a%d]", "") |