Module:String: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
wrong syntax
(Create module)
 
(wrong syntax)
Line 1:
local str = {}
 
function str:.len( frame )
return mw.ustring.len( frame.args[1] )
end
 
function str:.sub( frame )
return mw.ustring.sub( frame.args[1], tonumber( frame.args[2] ), tonumber( frame.args[3] ) )
end
 
function str:.match( frame )
return mw.ustring.match( frame.args[1], frame.args[2], tonumber( frame.args[3] ) )
end
0

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu