<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ABaseConvert</id>
	<title>Module:BaseConvert - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Module%3ABaseConvert"/>
	<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;action=history"/>
	<updated>2026-04-09T06:05:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=25062&amp;oldid=prev</id>
		<title>Richardpruen: 1 revision imported: Templates and CSS files</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=25062&amp;oldid=prev"/>
		<updated>2022-12-04T17:23:23Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Templates and CSS files&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:23, 4 December 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key uk_vapewiki:diff:1.41:old-25061:rev-25062 --&gt;
&lt;/table&gt;</summary>
		<author><name>Richardpruen</name></author>
	</entry>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=25061&amp;oldid=prev</id>
		<title>wikipedia&gt;Johnuniq: update from Module:BaseConvert/sandbox per talk; this removes globals</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=25061&amp;oldid=prev"/>
		<updated>2022-04-13T04:58:12Z</updated>

		<summary type="html">&lt;p&gt;update from &lt;a href=&quot;/mediawiki/index.php?title=Module:BaseConvert/sandbox&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:BaseConvert/sandbox (page does not exist)&quot;&gt;Module:BaseConvert/sandbox&lt;/a&gt; per talk; this removes globals&lt;/p&gt;
&lt;a href=&quot;https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;amp;diff=25061&amp;amp;oldid=9430&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>wikipedia&gt;Johnuniq</name></author>
	</entry>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=9430&amp;oldid=prev</id>
		<title>Richardpruen: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=9430&amp;oldid=prev"/>
		<updated>2021-09-07T09:09:07Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:09, 7 September 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key uk_vapewiki:diff:1.41:old-9429:rev-9430 --&gt;
&lt;/table&gt;</summary>
		<author><name>Richardpruen</name></author>
	</entry>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=9429&amp;oldid=prev</id>
		<title>Wikipedia&gt;GKFX: trim first argument in a-to-b syntax</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=9429&amp;oldid=prev"/>
		<updated>2021-05-03T18:23:12Z</updated>

		<summary type="html">&lt;p&gt;trim first argument in a-to-b syntax&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:23, 3 May 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l103&quot;&gt;Line 103:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 103:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     return _convert(n, base, from, precision, width, default, prefix, suffix)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     return _convert(n, base, from, precision, width, default, prefix, suffix)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;setmetatable(p, {&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	__index = function(t, k)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		from, base = k:match(&#039;^([0-9]+)to([0-9]+)$&#039;)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		if not from then return nil end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		return function(frame)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			args = frame.args&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    		return _convert(mw.text.trim(args[1]), base, from, args[&#039;precision&#039;], args[&#039;width&#039;],&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    			args[&#039;default&#039;], args[&#039;prefix&#039;], args[&#039;suffix&#039;])&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    	end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;})&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;return p&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;return p&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key uk_vapewiki:diff:1.41:old-2789:rev-9429:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Wikipedia&gt;GKFX</name></author>
	</entry>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=2789&amp;oldid=prev</id>
		<title>Richardpruen: 1 revision imported: Wikipedia article on Nicotine templates needed</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=2789&amp;oldid=prev"/>
		<updated>2020-12-12T16:55:11Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Wikipedia article on Nicotine templates needed&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:55, 12 December 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key uk_vapewiki:diff:1.41:old-2788:rev-2789 --&gt;
&lt;/table&gt;</summary>
		<author><name>Richardpruen</name></author>
	</entry>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=2788&amp;oldid=prev</id>
		<title>wikipedia&gt;Galobtter: Changed protection level for &quot;Module:BaseConvert&quot;: Highly visible template ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Module:BaseConvert&amp;diff=2788&amp;oldid=prev"/>
		<updated>2019-01-24T12:28:15Z</updated>

		<summary type="html">&lt;p&gt;Changed protection level for &amp;quot;&lt;a href=&quot;/mediawiki/index.php/Module:BaseConvert&quot; title=&quot;Module:BaseConvert&quot;&gt;Module:BaseConvert&lt;/a&gt;&amp;quot;: &lt;a href=&quot;/mediawiki/index.php?title=WP:High-risk_templates&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:High-risk templates (page does not exist)&quot;&gt;Highly visible template&lt;/a&gt; ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))&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 digits = &amp;#039;0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ&amp;#039;&lt;br /&gt;
&lt;br /&gt;
function normalizeFullWidthChars(s)&lt;br /&gt;
    return mw.ustring.gsub(s, &amp;#039;[！-～]&amp;#039;, function(s) &lt;br /&gt;
        return mw.ustring.char(mw.ustring.codepoint(s, 1) - 0xFEE0) &lt;br /&gt;
    end)    &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function _convert(n, base, from, precision, width, default, prefix, suffix)&lt;br /&gt;
    n = &amp;#039;&amp;#039; .. n   -- convert to a string&lt;br /&gt;
    &lt;br /&gt;
    -- strip off any leading &amp;#039;0x&amp;#039; (unless x is a valid digit in the input base)&lt;br /&gt;
    from = tonumber(from)&lt;br /&gt;
    if not from or from &amp;lt; 34 then&lt;br /&gt;
        local c&lt;br /&gt;
        n, c = n:gsub(&amp;#039;^(-?)0[Xx]&amp;#039;, &amp;#039;%1&amp;#039;)&lt;br /&gt;
        if c &amp;gt; 0 and not from then from = 16 end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- check for a negative sign. Do this while the input is still in string form,&lt;br /&gt;
    -- because tonumber doesn&amp;#039;t support negative numbers in non-10 bases.&lt;br /&gt;
    local sign = &amp;#039;&amp;#039;&lt;br /&gt;
    local c&lt;br /&gt;
    n, c = n:gsub(&amp;#039;^-&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
    if c &amp;gt; 0 then sign = &amp;#039;-&amp;#039; end&lt;br /&gt;
    &lt;br /&gt;
    -- replace any full-width Unicode characters in the string with their ASCII equivalents&lt;br /&gt;
    n = normalizeFullWidthChars(n)&lt;br /&gt;
    &lt;br /&gt;
    -- handle scientific notation with whitespace around the &amp;#039;e&amp;#039; e.g. &amp;#039;5 e7&amp;#039;&lt;br /&gt;
    n = n:gsub(&amp;#039;%s*[eE]%s*&amp;#039;, &amp;#039;e&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    from = from or 10&lt;br /&gt;
    local num = tonumber(n, from)&lt;br /&gt;
    base = tonumber(base)&lt;br /&gt;
    precision = tonumber(precision)&lt;br /&gt;
    width = tonumber(width)&lt;br /&gt;
    &lt;br /&gt;
    if not num or not base then return default or n end&lt;br /&gt;
    &lt;br /&gt;
    local i, f = math.modf(num)&lt;br /&gt;
&lt;br /&gt;
    local t = {}&lt;br /&gt;
    repeat&lt;br /&gt;
        local d = (i % base) + 1&lt;br /&gt;
        i = math.floor(i / base)&lt;br /&gt;
        table.insert(t, 1, digits:sub(d, d))&lt;br /&gt;
    until i == 0&lt;br /&gt;
    while #t &amp;lt; (width or 0) do&lt;br /&gt;
        table.insert(t, 1, &amp;#039;0&amp;#039;) &lt;br /&gt;
    end&lt;br /&gt;
    local intPart = table.concat(t, &amp;#039;&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    -- compute the fractional part&lt;br /&gt;
    local tf = {}&lt;br /&gt;
    while f &amp;gt; 0 and #tf &amp;lt; (precision or 10) do&lt;br /&gt;
        f = f * base&lt;br /&gt;
        i, f = math.modf(f)&lt;br /&gt;
        table.insert(tf, digits:sub(i + 1, i + 1))&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- add trailing zeros if needed&lt;br /&gt;
    if precision and #tf &amp;lt; precision then&lt;br /&gt;
        for i = 1, precision - #tf do&lt;br /&gt;
            table.insert(tf, &amp;#039;0&amp;#039;) &lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    fracPart = table.concat(tf, &amp;#039;&amp;#039;)&lt;br /&gt;
    &lt;br /&gt;
    -- remove trailing zeros if not needed&lt;br /&gt;
    if not precision then&lt;br /&gt;
        fracPart = fracPart:gsub(&amp;#039;0*$&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- add the radix point if needed&lt;br /&gt;
    if #fracPart &amp;gt; 0 then&lt;br /&gt;
        fracPart = &amp;#039;.&amp;#039; .. fracPart&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return (prefix or &amp;#039;&amp;#039;) .. sign .. intPart .. fracPart .. (suffix or &amp;#039;&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.convert(frame)&lt;br /&gt;
    -- Allow for invocation via #invoke or directly from another module&lt;br /&gt;
    local args&lt;br /&gt;
    if frame == mw.getCurrentFrame() then&lt;br /&gt;
        args = frame.args&lt;br /&gt;
    else&lt;br /&gt;
        args = frame&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local n = args.n&lt;br /&gt;
    local base = args.base&lt;br /&gt;
    local from = args.from&lt;br /&gt;
    local precision = args.precision&lt;br /&gt;
    local width = args.width&lt;br /&gt;
    local default = args.default&lt;br /&gt;
    local prefix = args.prefix&lt;br /&gt;
    local suffix = args.suffix&lt;br /&gt;
    return _convert(n, base, from, precision, width, default, prefix, suffix)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Galobtter</name></author>
	</entry>
</feed>