<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AGetParameters</id>
	<title>Module:GetParameters - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://zybkcn.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AGetParameters"/>
	<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=Module:GetParameters&amp;action=history"/>
	<updated>2026-05-04T15:04:51Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://zybkcn.com/w/index.php?title=Module:GetParameters&amp;diff=25878&amp;oldid=prev</id>
		<title>入我相思门：​已保护“模块:GetParameters”（[编辑=仅允许管理员]（无限期）[移动=仅允许管理员]（无限期））</title>
		<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=Module:GetParameters&amp;diff=25878&amp;oldid=prev"/>
		<updated>2022-11-23T13:24:01Z</updated>

		<summary type="html">&lt;p&gt;已保护“&lt;a href=&quot;/wiki/Module:GetParameters&quot; title=&quot;Module:GetParameters&quot;&gt;模块:GetParameters&lt;/a&gt;”（[编辑=仅允许管理员]（无限期）[移动=仅允许管理员]（无限期））&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;zh&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2022年11月23日 (三) 21:24的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;zh&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key zybkcn_com:diff:1.41:old-25877:rev-25878 --&gt;
&lt;/table&gt;</summary>
		<author><name>入我相思门</name></author>
	</entry>
	<entry>
		<id>https://zybkcn.com/w/index.php?title=Module:GetParameters&amp;diff=25877&amp;oldid=prev</id>
		<title>入我相思门：​创建页面，内容为“local p = {}  -- Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters.  This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application.  function p.getParameters( frame_args, arg_list )     local new_args = {};     local index = 1…”</title>
		<link rel="alternate" type="text/html" href="https://zybkcn.com/w/index.php?title=Module:GetParameters&amp;diff=25877&amp;oldid=prev"/>
		<updated>2022-11-23T13:23:48Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“local p = {}  --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters.  This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function p.getParameters( frame_args, arg_list )     local new_args = {};     local index = 1…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper function that populates the argument list given that user may need to use a mix of&lt;br /&gt;
named and unnamed parameters.  This is relevant because named parameters are not&lt;br /&gt;
identical to unnamed parameters due to string trimming, and when dealing with strings&lt;br /&gt;
we sometimes want to either preserve or remove that whitespace depending on the application.&lt;br /&gt;
]]&lt;br /&gt;
function p.getParameters( frame_args, arg_list )&lt;br /&gt;
    local new_args = {};&lt;br /&gt;
    local index = 1;&lt;br /&gt;
    local value;&lt;br /&gt;
    &lt;br /&gt;
    for i,arg in ipairs( arg_list ) do&lt;br /&gt;
        value = frame_args[arg]&lt;br /&gt;
        if value == nil then&lt;br /&gt;
            value = frame_args[index];&lt;br /&gt;
            index = index + 1;&lt;br /&gt;
        end&lt;br /&gt;
        new_args[arg] = value;&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return new_args;&lt;br /&gt;
end        &lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Helper Function to interpret boolean strings&lt;br /&gt;
]]&lt;br /&gt;
function p.getBoolean( boolean_str )&lt;br /&gt;
    local boolean_value;&lt;br /&gt;
    &lt;br /&gt;
    if type( boolean_str ) == &amp;#039;string&amp;#039; then&lt;br /&gt;
        boolean_str = boolean_str:lower();&lt;br /&gt;
        if boolean_str == &amp;#039;false&amp;#039; or boolean_str == &amp;#039;no&amp;#039; or boolean_str == &amp;#039;0&amp;#039; &lt;br /&gt;
                or boolean_str == &amp;#039;&amp;#039; then&lt;br /&gt;
            boolean_value = false;&lt;br /&gt;
        else&lt;br /&gt;
            boolean_value = true;&lt;br /&gt;
        end    &lt;br /&gt;
    elseif type( boolean_str ) == &amp;#039;boolean&amp;#039; then&lt;br /&gt;
        boolean_value = boolean_str;&lt;br /&gt;
    else&lt;br /&gt;
        error( &amp;#039;No boolean value found&amp;#039; );&lt;br /&gt;
    end    &lt;br /&gt;
    return boolean_value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.defined(frame)&lt;br /&gt;
	local arg = mw.text.trim(frame.args[1])&lt;br /&gt;
	--if arg == tostring(tonumber(arg)) then -- undesired result for &amp;#039;-0&amp;#039;&lt;br /&gt;
	--	arg = tonumber(arg)&lt;br /&gt;
	--end&lt;br /&gt;
	--if mw.ustring.find(arg, &amp;#039;^%s*-?[1-9][0-9]*%s*$&amp;#039;) ~= nil or arg == &amp;#039;0&amp;#039; then&lt;br /&gt;
	--	arg = tonumber(arg)&lt;br /&gt;
	--end&lt;br /&gt;
	if mw.ustring.find(arg, &amp;#039;^-?[1-9][0-9]*$&amp;#039;) ~= nil then&lt;br /&gt;
		arg = tonumber(arg)&lt;br /&gt;
	elseif arg == &amp;#039;0&amp;#039; then&lt;br /&gt;
		arg = 0&lt;br /&gt;
	end&lt;br /&gt;
	return frame:getParent().args[arg] ~= nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>入我相思门</name></author>
	</entry>
</feed>