View source for Module:Str endswith
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
-- This module implements {{str endswith}}.
local TRUE_STRING = 'yes'
local FALSE_STRING = ''
local p = {}
local function trim(s)
return s:match('^%s*(.-)%s*$')
end
function p.main(frame)
local args = frame:getParent().args
local s = args[1]
local pattern = args[2]
if not s or not pattern then
-- TRUE_STRING is not the natural choice here, but is needed for
-- backwards compatibility.
return TRUE_STRING
end
s = trim(s)
000
1:0
Templates used on this page:
- Template:High-use (view source)
- Template:High-use/num (view source)
- Template:High-use/risk (view source)
- Template:Module other (view source)
- Template:Module rating (view source)
- Template:Ombox (view source)
- Template:Order of magnitude (view source)
- Template:Rnd (view source)
- Template:Sigfig (view source)
- Template:Significant figures (view source)
- Template:Significant figures/rnd (view source)
- Template:Str endswith (view source)
- Template:Tl (view source)
- Module:Arguments (view source) (protected)
- Module:Effective protection level (view source) (protected)
- Module:Math (view source) (protected)
- Module:Message box (view source) (protected)
- Module:Message box/configuration (view source) (protected)
- Module:No globals (view source) (protected)
- Module:Str endswith (view source) (protected)
- Module:Str endswith/doc (view source)
- Module:String (view source) (protected)
- Module:Yesno (view source) (protected)
Return to Module:Str endswith.