Ändringar
+funktion comp för att jämföra två strängar
return string.rep( frame.args[1] or '', repetitions )
end
--[[
function to compare two strings, s1 and s2.
returns 1 if s1>s2, -1 if s1<s2, and 0 if s1==s2
]]
function str.comp(frame)
local new_args = str._getParameters( frame.args, {'s1', 's2'} );
local s1 = new_args['s1'] or ''
local s2 = new_args['s2'] or ''
if (s1>s2) then return 1 end
if (s1==s2) then return 0 end
if (s1<s2) then return -1 end
end
--[[
Anonym användare