Modul:String: Rozdiel medzi revíziami
Smazaný obsah Přidaný obsah
d |
+string.rep |
||
Riadok 381:
return result;
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'funkcia rep očakáva ako druhý paramete číslor, zadané je "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
|