View source for Module:ParameterCount
From iWiki
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
-- This module produces a count of all the arguments passed to it.
local yesno = require('Module:Yesno')
-- Trim a string
local function trim(s)
return s:match('^%s*(.-)%s*$')
end
-- Test whether a string is blank
local function isBlank(s)
return not s:find('%S')
end
-- Tests whether a string is a valid positional key, and if so, returns it. If
-- the key is invalid, this returns nil.
local function isPositionalKey(s)
s = trim(s)
if s:find('^[1-9][0-9]*$') then
return tonumber(s)
000
1:0
Template used on this page:
Return to Module:ParameterCount.