local i = {}
-- Funzione per l'utilizzo da altro modulo
i._IsLatin = function(args)
local txt = mw.text.trim(args[1])
if txt == nil or txt == '' then return nil end
local len = mw.ustring.len(txt)
local pos = 1
while (pos <= len) do
charval = mw.ustring.codepoint(mw.ustring.sub(txt, pos))
if charval >= 880 and charval < 8192 then
return false
elseif charval >= 8960 then
return false
end
pos = pos + 1
end
return true
end
-- Funzione per il template IsLatin
i.IsLatin = function(frame)
if mw.text.trim(frame.args[1]) == '' then return end
return i._IsLatin(frame.args) and 'sì' or 'no'
end
return i