Editing
Module:Ustring
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
require('strict') return setmetatable({}, { __index = function(t, k) local what = mw.ustring[k] if type(what) ~= "function" then return what end return function(frame) local fargs = frame.args local fargsused = { tag = true } local args = {} local str_i = 1 while fargs['s' .. str_i] do fargsused['s' .. str_i] = true args[str_i] = fargs['s' .. str_i] str_i = str_i + 1 end for i, v in ipairs(fargs) do fargsused[i] = true args[i + str_i - 1] = tonumber(v) or v:gsub("^\\", "", 1) end if not fargs.tag then return (what(unpack(args))) -- Outside parens truncate to first result avoiding tail call end local tagargs = {} for x, y in pairs(fargs) do if not fargsused[x] then tagargs[x] = y end end return frame:extensionTag{name = fargs.tag, content = what(unpack(args)), args = tagargs} end end })
Summary:
Please note that all contributions to nUSA Wiki Archive may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
NUSA Wiki Archive:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Ustring/doc
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Module
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Tools
What links here
Related changes
Special pages
Page information