View source for Module:String2
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local p = {}
p.trim = function(frame)
return mw.text.trim(frame.args[1] or "")
end
p.sentence = function (frame)
-- {{lc:}} is strip-marker safe, string.lower is not.
frame.args[1] = frame:callParserFunction('lc', frame.args[1])
return p.ucfirst(frame)
end
p.ucfirst = function (frame )
local s = mw.text.trim( frame.args[1] or "" )
local s1 = ""
-- if it's a list chop off and (store as s1) everything up to the first <li>
local lipos = mw.ustring.find(s, "<li>" )
if lipos then
s1 = mw.ustring.sub(s, 1, lipos + 3)
s = mw.ustring.sub(s, lipos + 4)
000
1:0
Template used on this page:
Return to Module:String2.