<?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%3ASandbox%2FErutuon%2Fscripts</id>
	<title>Module:Sandbox/Erutuon/scripts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FErutuon%2Fscripts"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Erutuon/scripts&amp;action=history"/>
	<updated>2026-05-25T20:21:57Z</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:Sandbox/Erutuon/scripts&amp;diff=145401&amp;oldid=prev</id>
		<title>imported&gt;Erutuon: fixed</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Erutuon/scripts&amp;diff=145401&amp;oldid=prev"/>
		<updated>2018-04-12T19:34:59Z</updated>

		<summary type="html">&lt;p&gt;fixed&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local cp_to_sc = require &amp;#039;Module:Language/scripts&amp;#039;.codepointToScript&lt;br /&gt;
&lt;br /&gt;
local function in_array(arr, val)&lt;br /&gt;
	for i, v in ipairs(arr) do&lt;br /&gt;
		if v == val then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function mapIter(func, iter, iterable, initVal)&lt;br /&gt;
	local array = {}&lt;br /&gt;
	local i = 0&lt;br /&gt;
	for x, y in iter, iterable, initVal do&lt;br /&gt;
		i = i + 1&lt;br /&gt;
		array[i] = func(y, x, iterable)&lt;br /&gt;
	end&lt;br /&gt;
	return array&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.list_chars_in_script(str)&lt;br /&gt;
	local scripts = {}&lt;br /&gt;
	for codepoint in mw.ustring.gcodepoint(str) do&lt;br /&gt;
		local script = cp_to_sc(codepoint)&lt;br /&gt;
		scripts[script] = scripts[script] or {}&lt;br /&gt;
		local char = mw.ustring.char(codepoint)&lt;br /&gt;
		if not in_array(scripts[script], char) then&lt;br /&gt;
			table.insert(scripts[script], char)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for script, characters in pairs(scripts) do&lt;br /&gt;
		table.sort(characters)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return table.concat(&lt;br /&gt;
		mapIter(&lt;br /&gt;
			function (codepoints, script)&lt;br /&gt;
				return (&amp;#039;\n* %s: %s&amp;#039;)&lt;br /&gt;
					:format(script, table.concat(codepoints))&lt;br /&gt;
			end,&lt;br /&gt;
			pairs(scripts)))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	return p.list_chars_in_script(frame.args[1])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Erutuon</name></author>
	</entry>
</feed>