https://nordiclarp.org/w/index.php?title=Module:Str_endswith&feed=atom&action=history
Module:Str endswith - Revision history
2024-03-28T11:46:34Z
Revision history for this page on the wiki
MediaWiki 1.34.2
https://nordiclarp.org/w/index.php?title=Module:Str_endswith&diff=8922&oldid=prev
Johannes Axner: Protected "Module:Str endswith" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
2018-12-29T17:50:52Z
<p>Protected "<a href="/wiki/Module:Str_endswith" title="Module:Str endswith">Module:Str endswith</a>" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 17:50, 29 December 2018</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Johannes Axner
https://nordiclarp.org/w/index.php?title=Module:Str_endswith&diff=6982&oldid=prev
Johannes Axner: 1 revision imported
2018-12-29T00:38:41Z
<p>1 revision imported</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 00:38, 29 December 2018</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Johannes Axner
https://nordiclarp.org/w/index.php?title=Module:Str_endswith&diff=6981&oldid=prev
en>Mr. Stradivarius: Protected "Module:Str endswith": High-risk Lua module ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
2016-11-07T07:15:08Z
<p>Protected "<a href="/wiki/Module:Str_endswith" title="Module:Str endswith">Module:Str endswith</a>": <a href="/w/index.php?title=WP:High-risk_templates&action=edit&redlink=1" class="new" title="WP:High-risk templates (page does not exist)">High-risk Lua module</a> ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</p>
<p><b>New page</b></p><div>-- This module implements {{str endswith}}.<br />
<br />
local TRUE_STRING = 'yes'<br />
local FALSE_STRING = ''<br />
<br />
local p = {}<br />
<br />
local function trim(s)<br />
return s:match('^%s*(.-)%s*$')<br />
end<br />
<br />
function p.main(frame)<br />
local args = frame:getParent().args<br />
local s = args[1]<br />
local pattern = args[2]<br />
if not s or not pattern then<br />
-- TRUE_STRING is not the natural choice here, but is needed for<br />
-- backwards compatibility.<br />
return TRUE_STRING<br />
end<br />
s = trim(s)<br />
pattern = trim(pattern)<br />
if pattern == '' then<br />
-- All strings end with the empty string.<br />
return TRUE_STRING<br />
end<br />
if mw.ustring.sub(s, 0 - mw.ustring.len(pattern), -1) == pattern then<br />
return TRUE_STRING<br />
else<br />
return FALSE_STRING<br />
end<br />
end<br />
<br />
return p</div>
en>Mr. Stradivarius