lua binder improvments

This commit is contained in:
Eduardo Bart
2012-01-06 01:29:26 -02:00
parent b9e5a4e463
commit 0cb5facd7a
10 changed files with 132 additions and 68 deletions

View File

@@ -17,3 +17,4 @@ Module
require 'dispatcher'
require 'widget'
require 'effects'
require 'settings'

View File

@@ -16,11 +16,3 @@ end
function string:trim()
return self:match('^%s*(.*%S)') or ''
end
function toboolean(str)
str = str:trim()
if str == '1' or str == 'true' then
return true
end
return false
end

View File

@@ -68,3 +68,11 @@ function resolvepath(filePath, depth)
return filePath
end
end
function toboolean(str)
str = str:trim():lower()
if str == '1' or str == 'true' then
return true
end
return false
end