<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AUstring%2Fsandbox</id>
	<title>Module:Ustring/sandbox - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AUstring%2Fsandbox"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Ustring/sandbox&amp;action=history"/>
	<updated>2026-05-11T23:39:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Ustring/sandbox&amp;diff=147548&amp;oldid=prev</id>
		<title>imported&gt;WOSlinker: use require(&#039;strict&#039;) instead of require(&#039;Module:No globals&#039;)</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Ustring/sandbox&amp;diff=147548&amp;oldid=prev"/>
		<updated>2022-10-21T09:58:52Z</updated>

		<summary type="html">&lt;p&gt;use require(&amp;#039;strict&amp;#039;) instead of require(&amp;#039;Module:No globals&amp;#039;)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
return setmetatable({}, {&lt;br /&gt;
	__index = function(t, k)&lt;br /&gt;
		local what = mw.ustring[k]&lt;br /&gt;
		if type(what) ~= &amp;quot;function&amp;quot; then&lt;br /&gt;
			return what&lt;br /&gt;
		end&lt;br /&gt;
		return function(frame)&lt;br /&gt;
			local fargs = frame.args&lt;br /&gt;
			local fargsused = { tag = true, onerror = true }&lt;br /&gt;
			local args = {}&lt;br /&gt;
			local str_i = 1&lt;br /&gt;
			while fargs[&amp;#039;s&amp;#039; .. str_i] do&lt;br /&gt;
				fargsused[&amp;#039;s&amp;#039; .. str_i] = true&lt;br /&gt;
				args[str_i] = fargs[&amp;#039;s&amp;#039; .. str_i]&lt;br /&gt;
				str_i = str_i + 1&lt;br /&gt;
			end&lt;br /&gt;
			for i, v in ipairs(fargs) do&lt;br /&gt;
				fargsused[i] = true&lt;br /&gt;
				args[i + str_i - 1] = tonumber(v) or v:gsub(&amp;quot;^\\&amp;quot;, &amp;quot;&amp;quot;, 1)&lt;br /&gt;
			end&lt;br /&gt;
			local result = nil&lt;br /&gt;
			if fargs.onerror then&lt;br /&gt;
				local success&lt;br /&gt;
				success, result = pcall(what, unpack(args))&lt;br /&gt;
				if not success then&lt;br /&gt;
					return fargs.onerror&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				result = what(unpack(args))&lt;br /&gt;
			end&lt;br /&gt;
			if not fargs.tag then&lt;br /&gt;
				return result&lt;br /&gt;
			end&lt;br /&gt;
			local tagargs = {}&lt;br /&gt;
			for x, y in pairs(fargs) do&lt;br /&gt;
				if not fargsused[x] then tagargs[x] = y end&lt;br /&gt;
			end&lt;br /&gt;
			return frame:extensionTag{name = fargs.tag, content = result, args = tagargs}&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
})&lt;/div&gt;</summary>
		<author><name>imported&gt;WOSlinker</name></author>
	</entry>
</feed>