View source for Module:DecodeEncode
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
require('strict')
local p = {}
local function _getBoolean( boolean_str )
-- from: module:String; adapted
-- requires an explicit true
local boolean_value
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower()
if boolean_str == 'true' or boolean_str == 'yes' or boolean_str == '1' then
boolean_value = true
else
boolean_value = false
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str
else
boolean_value = false
end
return boolean_value
end
000
1:0
Template used on this page:
Return to Module:DecodeEncode.