Modulo:IsLatin
Vai alla navigazione
Vai alla ricerca
La documentazione per questo modulo può essere creata in Modulo:IsLatin/man
local p = {} -- Funzione per l'utilizzo da altro modulo function p._IsLatin(args) local txt = args[1] or '' if mw.text.trim(txt) == '' then return nil end local len = mw.ustring.len(txt) local pos = 1 while (pos <= len) do local 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 function p.IsLatin(frame) return p._IsLatin(frame.args) and 'sì' or '' end return p