Ignoremodule lowercase | German locale file

This commit is contained in:
Samuel
2013-01-19 19:02:22 +01:00
parent f389c3b3fe
commit e8d0996817
3 changed files with 331 additions and 3 deletions

View File

@@ -47,8 +47,11 @@ function table.merge(t, src)
end
end
function table.find(t, value)
function table.find(t, value, lowercase)
for k,v in pairs(t) do
if lowercase and type(value) == 'string' and type(v) == 'string' then
if v:lower() == value:lower() then return k end
end
if v == value then return k end
end
end