View source for Module:Utils
From Halopedia, the Halo wiki
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local utils = {}
function utils.strip( str )
return mw.ustring.gsub(str, '^%s*(.-)%s*$', '%1')
end
function utils.empty( val )
return val == nil or val == ''
end
function utils.defaultIfEmpty( val, default )
if val == nil or val == '' then
return default
else
return val
end
end
function utils.loadDataIfExists( name )
local success, data = pcall( mw.loadData, name )
000
1:0
Template used on this page:
Return to Module:Utils.