Module:Bac à sable/Lowercase
Apparence
La documentation de ce module est générée par le modèle {{Documentation module}}.
Les éditeurs peuvent travailler dans le bac à sable (créer).
Voir les statistiques d'appel depuis le wikicode sur l'outil wstat et les appels depuis d'autres modules.
local p = {}
local nomsDataLangue = {}
for k, v in pairs( mw.loadData( 'Module:Langue/Data' ) ) do
nomsDataLangue[ #nomsDataLangue + 1 ] = v.nom
end
function p.v1( frame )
local args = frame:getParent().args
local texts
if args['noms data langue'] == 'oui' then
texts = nomsDataLangue
else
texts = { args.text }
end
local uLower = mw.ustring.lower
for i = 1, args.nb do
for j = 1, #texts do
local text = texts[ j ]
uLower( text )
end
end
end
function p.v2( frame )
local args = frame:getParent().args
local texts
if args['noms data langue'] == 'oui' then
texts = nomsDataLangue
else
texts = { args.text }
end
local uLower = mw.ustring.lower
for i = 1, args.nb do
for j = 1, #texts do
local text = texts[ j ]
if text:find( '[^a-z ]' ) then
uLower( text )
end
end
end
end
return p