Module:String
From Ashenzari's Archive
More actions
local p = {}
function p.first_word(frame)
local text = frame.args[1] for token in string.gmatch(text, "[^%s]+") do return token end
end
function p.fix_magic_resistance(frame)
local text = frame.args[1] if text == "Immune" or text == "immune" then return "1000" end return text
end
function p.fix_monster_size(frame)
local text = frame.args[1] for token in string.gmatch(text, "|[^%s]+%]") do return token end
end
return p