<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mbwiki.stairwaygames.work/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AReplace</id>
	<title>Module:Replace - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mbwiki.stairwaygames.work/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AReplace"/>
	<link rel="alternate" type="text/html" href="https://mbwiki.stairwaygames.work/w/index.php?title=Module:Replace&amp;action=history"/>
	<updated>2026-04-09T15:08:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://mbwiki.stairwaygames.work/w/index.php?title=Module:Replace&amp;diff=5377&amp;oldid=prev</id>
		<title>Admin coral island: Created page with &quot;--- Module copied from Genshin Impact wiki.  local p = {} local ie = require(&#039;Module:Feature&#039;).isEmpty  function p.main(frame) 	local args = require(&#039;Module:Arguments&#039;).getArgs(frame, { 		parentFirst = true, 		wrapper = { &#039;Template:Replace&#039; } 	}) 	return p._main(args) end  function p._main(args) 	local inputString = args[1] or nil 	local search = args[2] or args.s1 or nil 	local replace = args[3] or args.r1 or &#039;&#039;  	-- argument validation 	if ie(inputString) then 		return...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mbwiki.stairwaygames.work/w/index.php?title=Module:Replace&amp;diff=5377&amp;oldid=prev"/>
		<updated>2023-08-02T09:48:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;--- Module copied from Genshin Impact wiki.  local p = {} local ie = require(&amp;#039;Module:Feature&amp;#039;).isEmpty  function p.main(frame) 	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, { 		parentFirst = true, 		wrapper = { &amp;#039;Template:Replace&amp;#039; } 	}) 	return p._main(args) end  function p._main(args) 	local inputString = args[1] or nil 	local search = args[2] or args.s1 or nil 	local replace = args[3] or args.r1 or &amp;#039;&amp;#039;  	-- argument validation 	if ie(inputString) then 		return...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--- Module copied from Genshin Impact wiki.&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
local ie = require(&amp;#039;Module:Feature&amp;#039;).isEmpty&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, {&lt;br /&gt;
		parentFirst = true,&lt;br /&gt;
		wrapper = { &amp;#039;Template:Replace&amp;#039; }&lt;br /&gt;
	})&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local inputString = args[1] or nil&lt;br /&gt;
	local search = args[2] or args.s1 or nil&lt;br /&gt;
	local replace = args[3] or args.r1 or &amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	-- argument validation&lt;br /&gt;
	if ie(inputString) then&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	if ie(search) then&lt;br /&gt;
		return inputstring&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if args[4] or args.s2 then&lt;br /&gt;
		local y = 2&lt;br /&gt;
		while args[y] or args[&amp;#039;s&amp;#039; .. y/2] do&lt;br /&gt;
			inputString = p.Replace(inputString, (args[y] or args[&amp;#039;s&amp;#039;..y/2]), (args[y+1] or args[&amp;#039;s&amp;#039;..(y+1)/2] or &amp;#039;&amp;#039;))&lt;br /&gt;
			y = y + 2&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		inputString = p.Replace(inputString, search, replace)&lt;br /&gt;
	end&lt;br /&gt;
	return inputString&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.Replace(str, search, replace)&lt;br /&gt;
	-- replace key terms&lt;br /&gt;
	search = search:gsub(&amp;#039;{space}&amp;#039;, &amp;#039; &amp;#039;)&lt;br /&gt;
	replace = replace:gsub(&amp;#039;{space}&amp;#039;, &amp;#039; &amp;#039;):gsub(&amp;#039;{newline}&amp;#039;, &amp;#039;&amp;lt;br /&amp;gt;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	-- result&lt;br /&gt;
	return str:gsub(search, replace)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Admin coral island</name></author>
	</entry>
</feed>