Search Results: Module:Trim quotes/testcases
Sorry, the article you're looking for isn't specifically available. Here are related topics:
Module:Trim quotes
Selasa, 2019-05-21 08:19:23local p = {} function p._trim(s) if s then if s:match([[^(['"]).*%1$]]) then return p._trim(string.sub(s,2,-2)) else return s end else return ""...
Click to read more »Module:Trim quotes/sandbox
Selasa, 2019-05-21 01:27:13local p = {} function p._trim(s) if s then if mw.ustring.find(s,'^".*"$') or mw.ustring.find(s,"^'.*'$") then return p._trim(string.sub(s,2,-2)) else...
Click to read more »Module:Trim quotes/doc
Kamis, 2023-12-28 21:53:13Implements {{Trim quotes}}. {{#invoke:Trim quotes|trim|string to trim}} or {{#invoke:Trim quotes|trim|s=string to trim}}...
Click to read more »Module:Params/doc/examples/trim and call
Senin, 2024-05-27 00:53:46parameters, trimmed, to another custom template. Compare writing {{tl| hatnote }} ↳ {{ hatnote }} with {{module:params/doc/examples/trim and call | tl...
Click to read more »Module:Params/doc/examples/trim and call/doc
Sabtu, 2024-02-03 19:23:08parameters, trimmed, to another custom template. Compare writing {{tl| hatnote }} ↳ {{ hatnote }} with {{module:params/doc/examples/trim and call | tl...
Click to read more »Module:Sandbox/Ahecht/trim date
Selasa, 2018-02-13 22:35:16local p = {} function p.trim(frame) local date = frame:getParent().args[1] if date == nil then date = frame.args[1] end if date == nil then date =...
Click to read more »Module:String2
Rabu, 2025-02-19 19:24:59require ('strict'); local p = {} p.trim = function(frame) return mw.text.trim(frame.args[1] or "") end p.sentence = function (frame) -- {{lc:}} is...
Click to read more »Module:Wikidata
Sabtu, 2023-03-04 11:35:36local itemID = mw.text.trim(frame.args[1] or "") local propertyID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "")...
Click to read more »Module:EditAtWikidata
Rabu, 2025-10-15 02:53:05["message"] = "Edit this at Wikidata" } local function trimToNil(text) -- Return trimmed non-empty text, or nil. if type(text) == 'string' then ...
Click to read more »Module:Text
Sabtu, 2025-04-26 19:19:49function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v))...
Click to read more »Module:EditAtWikidata/sandbox
Minggu, 2022-03-13 11:13:40["message"] = "Edit this at Wikidata" } local function trimToNil(text) -- Return trimmed non-empty text, or nil. if type(text) == 'string' then ...
Click to read more »Module:ParameterCount
Sabtu, 2017-02-11 21:32:57passed to it. local yesno = require('Module:Yesno') -- Trim a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- Test whether a...
Click to read more »Module:Wikidata/sandbox
Sabtu, 2023-03-04 11:34:03local itemID = mw.text.trim(frame.args[1] or "") local propertyID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "")...
Click to read more »Module:TrainingPages
Senin, 2023-04-03 04:47:58trim(frame.args.page) defaultpage = frame.args.defaultpage and mw.text.trim(frame.args.defaultpage) indexmodule = frame.args.index and mw.text.trim(frame...
Click to read more »Module:String2/sandbox
Rabu, 2025-02-19 19:23:52require ('strict'); local p = {} p.trim = function(frame) return mw.text.trim(frame.args[1] or "") end p.sentence = function (frame) -- {{lc:}} is...
Click to read more »Module:Sandbox/Tom.Reding/Tools
Jumat, 2024-08-30 00:14:22trim = mw.ustring.gsub(trim, 'countrie(%f[\0, ])', 'countries%1') trim = mw.ustring.gsub(trim, 'citru(%f[\0, ])', 'citrus%1') trim =...
Click to read more »Module:Check for unknown parameters
Jumat, 2025-10-17 18:01:38'mapframe-width', 'mapframe-wikidata', 'mapframe-zoom' } local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return...
Click to read more »Module:Check for unknown parameters/sandbox
Senin, 2025-10-06 13:52:57'mapframe-width', 'mapframe-wikidata', 'mapframe-zoom' } local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return...
Click to read more »Module:Check for conflicting parameters
Minggu, 2025-12-28 10:34:01local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end function p.check(frame)...
Click to read more »Module:TNT
Minggu, 2020-08-30 14:28:25dataset = mw.text.trim(v) elseif k == 2 then id = mw.text.trim(v) elseif type(k) == 'number' then table.insert(params, mw.text.trim(v)) elseif...
Click to read more »Module:Librivox book
Kamis, 2024-11-14 23:50:57disambig paren stitle = dtitle if trimArg(args.stitle) then stitle = trimArg(args.stitle) if not trimArg(args.title) then ...
Click to read more »Module:Tree chart
Selasa, 2024-04-30 22:22:01ipairs(args) do local trimmedVal = val:match('^%s*(.-)%s*$') if trimmedVal == '' then trimmedVal = '$' end if cells[trimmedVal] then table.insert(cell_args...
Click to read more »Module:MLB standings
Sabtu, 2024-09-07 07:29:08text.trim(args[currentIdx]), homeWins = tonumber(mw.text.trim(args[currentIdx+1])), homeLosses = tonumber(mw.text.trim(args[currentIdx+2]))...
Click to read more »Module:Gutenberg
Jumat, 2022-04-01 15:43:54org/ebooks/author/" local urlhead = nil -- Argument |id= id = trimArg(args[1]) or trimArg(args.id) if not id then local bestP1938 = mw.wikibase...
Click to read more »Module:Tree chart/sandbox
Selasa, 2024-04-30 20:27:16ipairs(args) do local trimmedVal = val:match('^%s*(.-)%s*$') if trimmedVal == '' then trimmedVal = '$' end if cells[trimmedVal] then table.insert(cell_args...
Click to read more »Module:Uses Wikidata
Kamis, 2022-06-09 00:12:17mw.text.trim(args[1] or '') == '' then args = frame.args end local result = '<ul>' local ii = 1 while true do local p_num = mw.text.trim(args[ii]...
Click to read more »Module:Adjacent stations/OC Transpo
Senin, 2026-03-16 02:20:57"ffffff", ["left terminus"] = "Tunney's Pasture", ["right terminus"] = "Trim", ["note-mid"] = "Opens 2026", }, ["1W"] = { ["title"] = "[[Line...
Click to read more »Module:Sandbox/genewiki/geneboxdev
Rabu, 2015-10-21 23:03:40local itemID = mw.text.trim(frame.args[1] or "") local propertyID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "")...
Click to read more »Module:Gutenberg/sandbox
Jumat, 2022-04-01 15:38:16org/ebooks/author/" local urlhead = nil -- Argument |id= id = trimArg(args[1]) or trimArg(args.id) if not id then local bestP1938 = mw.wikibase...
Click to read more »Module:NUMBEROF
Minggu, 2024-09-29 10:52:34wikimedia', wikitech = 'wikitech.wikimedia', } local function trimArg(arg, i) arg = mw.text.trim(arg or '') if arg == '' then if i then error('Parameter...
Click to read more »Module:Sports reference
Kamis, 2023-03-23 04:17:39Sports-Reference URL. -- Trim any leading or trailing spaces. If it contains ".html", remove it. local id = string.gsub((mw.text.trim(frame.args[1]) or "")...
Click to read more »Module:Arbitration Committee open tasks
Sabtu, 2025-12-27 06:40:20gmatch = mw.ustring.gmatch local match = mw.ustring.match local trim = mw.text.trim local insert = table.insert local concat = table.concat function...
Click to read more »Module:Sandbox/B2project/NHL Standings
Selasa, 2016-08-02 08:18:01text utility functions mw.text = mw.text or {} if (mw.text.trim == nil) then mw.text.trim = function(s) if (s == nil) then return...
Click to read more »Module:Sandbox/RexxS/String2
Jumat, 2016-07-01 22:53:16function(frame) local s = mw.text.trim(frame.args[1] or "") return string.upper(s) end p.lower = function(frame) local s = mw.text.trim(frame.args[1] or "") return...
Click to read more »Module:K-pop track listing
Kamis, 2026-03-19 03:09:35local p = {} local function trim(value) if value == nil then return nil end value = mw.text.trim(tostring(value)) if value == '' then return...
Click to read more »Module:Rugby box collapsible
Jumat, 2024-07-05 01:35:42isnotempty(s) return s and s:match( '^%s*(.-)%s*$' ) ~= '' end local function trim(s) if isnotempty(s) then s = s:match('^[\'"%s]*(.-)[\'"%s]*$') return...
Click to read more »Module:WikidataIB
Sabtu, 2025-12-27 18:46:46local findLang = function(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj...
Click to read more »Module:Sandbox/Ineditable/Twitter
Senin, 2014-06-16 21:24:39) local id = trim(frame.args.id or frame.args[1]) -- if not present should print an error. User friendly errors ¿? local name = trim(frame.args.name...
Click to read more »Module:Sandbox/Licsth
Sabtu, 2018-01-06 04:02:04args['show'] show = trim(show) local era = frame.args.era or "" era = trim(era) local label = frame.args.label label = trim(label) local post_date...
Click to read more »Module:TrainingPages/sandbox
Jumat, 2014-03-21 02:12:03currentpage = frame.args.page and mw.text.trim(frame.args.page) defaultpage = frame.args.defaultpage and mw.text.trim(frame.args.defaultpage) indexmodule...
Click to read more »Module:Pagelist
Jumat, 2025-12-19 20:50:22main(frame) local origArgs = require('Module:Arguments').getArgs(frame, { trim = false, removeBlanks = false, wrappers = 'Template:Pagelist' }) --...
Click to read more »Module:Sandbox/RexxS/GCI10
Minggu, 2017-12-24 22:59:49Google-Code-in-2017 -- mw.text.trim( nil ) generates an error p = {} -- Example of trim p.trimgood = function( frame ) txt = mw.text.trim( frame.args[1] or ""...
Click to read more »Module:Multilingual
Selasa, 2022-08-09 07:07:40storage = mw.text.trim( storage ) s = storage:lower() if s:sub( 1, 2 ) == "c:" then storage = mw.text.trim( storage:sub( 3 )...
Click to read more »Module:Uses Wikidata/sandbox
Minggu, 2025-12-21 05:53:58mw.text.trim(args[1] or '') == '' then args = frame.args end local result = '<ul>' local ii = 1 while true do local p_num = mw.text.trim(args[ii]...
Click to read more »Module:SCOTUS-termlist-entry
Senin, 2026-05-18 01:52:22else args["case-article"] = nil end if args.page ~= nil and mw.text.trim(args.page) ~= "" then args.page = args.page else args.page = "___" end ...
Click to read more »Module:SDcat
Sabtu, 2024-02-17 10:57:52description local sdesc = mw.text.trim(args.sd or ""):lower() -- Wikidata entity-ID local itemID = mw.text.trim(args.qid or "") -- link prefix, strip...
Click to read more »Module:Sports reference/sandbox
Jumat, 2020-05-22 07:21:55Sports-Reference URL. -- Trim any leading or trailing spaces. If it contains ".html", remove it. local id = string.gsub((mw.text.trim(frame.args[1]) or "")...
Click to read more »Module:TemplatePar
Kamis, 2023-04-20 01:13:15Foreign() -- TemplUtl.faculty() local r r = mw.text.trim( attempt ):lower() if r == "" then if accept == "boolean+" then...
Click to read more »Module:Type in location
Jumat, 2023-04-28 01:16:32ustring.gsub(text,'^[%s,]*', '') --trim commas and spaces from beginning text = mw.ustring.gsub(text,'[%s,]*$', '') --trim commas and spaces from end return...
Click to read more »Module:Sandbox/isaacl/NHL standings
Senin, 2014-08-11 07:08:45trim(argList[1])) teamInfo.losses = tonumber(mw.text.trim(argList[2])) teamInfo.nonRegulationLosses = tonumber(mw.text.trim(argList[3]))...
Click to read more »Module:Class
Senin, 2025-06-02 19:35:38require('Module:Arguments') return mArguments.getArgs(frame, { wrappers = wrapper, trim = false, removeBlanks = false }) end local function makeInvokeFunction(func...
Click to read more »Module:NYCS SSI
Sabtu, 2022-05-28 00:54:52local cfg = mw.loadData('Module:NYCS SSI/configuration') -- trim whitespace local function trim(s) return s:match('^%s*(.-)%s*$') end function p._main(args)...
Click to read more »Module:Routemap
Kamis, 2026-03-26 07:59:00text.trim(tmp[#tmp])) result['linfo3+2'] = mw.text.trim(tmp[#tmp - 1]) if #tmp > 2 then tmp[#tmp - 2] = mw.text.trim(tmp[#tmp - 2]) ...
Click to read more »Module:Sandbox/RexxS/AA
Jumat, 2015-09-18 00:40:43local itemID = mw.text.trim(frame.args[1] or "") local propertyID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "")...
Click to read more »Module:Check for conflicting parameters/sandbox
Minggu, 2025-12-28 10:34:01local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end function p.check(frame)...
Click to read more »Module:IPAc-en
Senin, 2024-07-08 15:19:47require('Module:Category handler').main local categories = {} -- Trims whitespace from a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- This implements...
Click to read more »Module:Sandbox/RexxS/Unitsdemo
Jumat, 2016-04-29 23:52:09require('Module:Sandbox/RexxS/Units') p.sing = function(frame) local QID = mw.text.trim(frame.args[1] or "") if QID and unitByQid[QID] then return unitByQid[QID]...
Click to read more »Module:Sandbox/RexxS/GetImages
Rabu, 2015-09-30 21:00:30propertyID = mw.text.trim(frame.args[1] or "") local input_parm = mw.text.trim(frame.args[2] or "") local sep = mw.text.trim(frame.args[3] or " ")...
Click to read more »Module:Arguments/doc
Kamis, 2026-02-26 17:42:19default, this module helps trim whitespace also for position arguments. To preserve whitespace for positional arguments, set the trim option to false. local...
Click to read more »Module:Librivox book/sandbox
Kamis, 2024-11-14 18:24:03disambig paren stitle = dtitle if trimArg(args.stitle) then stitle = trimArg(args.stitle) if not trimArg(args.title) then ...
Click to read more »Module:Arbitration Committee open tasks/sandbox
Sabtu, 2025-12-27 06:32:18gmatch = mw.ustring.gmatch local match = mw.ustring.match local trim = mw.text.trim local insert = table.insert local concat = table.concat function...
Click to read more »Module:Footnotes/sandbox2
Kamis, 2018-08-30 02:53:06"", P1 = "", P2 = "", P3 = "", P4 = "", P5 = "" } }; function trim( str ) if str == nil then return nil; end return str:match( "^%s*(.-)%s*$");...
Click to read more »Module:InfoboxImage
Sabtu, 2025-10-18 16:45:47ustring.gsub(image, "([^|]*)|.*", "%1") must not return nil') end -- Trim spaces image = mw.ustring.gsub(image, '^[ ]*(.-)[ ]*$', '%1'); assert(image...
Click to read more »Module:SDcat/sandbox
Jumat, 2020-09-18 19:51:09description local sdesc = mw.text.trim(args.sd or ""):lower() -- Wikidata entity-ID local itemID = mw.text.trim(args.qid or "") -- link prefix, strip...
Click to read more »Module:Sorted plain list
Kamis, 2022-12-08 06:03:15require('Module:List').unbulleted local function transformstring(s) local a = mw.text.trim(s) a = mw.ustring.gsub(a, '%[%[[^%[%]<>|][^%[%]<>|]*|([^%[%]<>|][^%[%]<>|]*)%]%]'...
Click to read more »Module:Sandbox/Imagesize
Senin, 2019-04-01 04:39:39return w, h end function p.getDimensions(frame) local filename = mw.text.trim(frame.args[1] or "") if filename == "" then return end local w, h =...
Click to read more »Module:IPAc-en/sandbox
Sabtu, 2025-09-06 21:24:47require('Module:Category handler').main local categories = {} -- Trims whitespace from a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- This implements...
Click to read more »Module:Sandbox/Aidan9382/Link once
Jumat, 2023-08-11 13:54:31tricks|]] --]=] local trim = mw.text.trim local trimmed = string.sub(wikilink, 3, -3) local firstPipe = string.find(trimmed, "|") if firstPipe then...
Click to read more »Module:Sandbox/Toohool
Selasa, 2013-04-02 14:17:04local p = {} local function trim(s) return mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1") end function p.makeWrapper(func, opts) opts = opts or...
Click to read more »Module:MLB standings/sandbox
Sabtu, 2024-09-07 07:25:40text.trim(args[currentIdx]), homeWins = tonumber(mw.text.trim(args[currentIdx+1])), homeLosses = tonumber(mw.text.trim(args[currentIdx+2]))...
Click to read more »Module:WikidataIB/sandbox
Senin, 2025-12-22 06:49:07local findLang = function(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj...
Click to read more »Module:For loop
Kamis, 2025-04-03 23:31:32"Template:For_loop"}) end function p.main(frame) local args = getArgs(frame, { trim = false, removeBlanks = false }) return p._main(args) end function p...
Click to read more »Module:RexxS
Kamis, 2022-11-03 00:49:08linked to the article p.getLink = function(frame) local itemID = mw.text.trim(frame.args[1] or "") if itemID == "" then return end local sitelink = mw...
Click to read more »Module:Unsigned
Rabu, 2026-01-21 06:35:14local p = {} local yesno = require('Module:Yesno') local function trim(s) return s:gsub("^%s+", ""):gsub("%s+$", ""):gsub("\226\128\142", "") end function...
Click to read more »Module:Infobox sort
Jumat, 2026-02-27 20:31:31in pairs(frame.args) do -- Remove newlines local stripped = mw.text.trim((string.gsub(value, "\n", ""))) if stripped:match("%S") ~= nil then...
Click to read more »Module:InfoboxNonEmergencyNumber
Senin, 2025-09-29 02:38:05Helper function: trim and convert to string local function trimmed(args, key) if not args[key] then return "" end return mw.text.trim(tostring(args[key]))...
Click to read more »Module:Football group summary
Sabtu, 2026-05-02 02:08:50"August", "September", "October", "November", "December", } local function trim(s) if not s then return "" end return (s:gsub("^%s+", ""):gsub("%s+$",...
Click to read more »Module:Peg solitaire sequence
Minggu, 2026-03-15 01:16:03already existing. local p = {} local function trim(s) if s == nil then return nil end s = mw.text.trim(tostring(s)) if s == '' then return nil ...
Click to read more »Module:Football attendance summation
Sabtu, 2026-05-30 00:46:32str = mw.text.trim(str) local s, e = str:match('^(.-)%-(.+)$') if not s then s, e = str, str end s, e = mw.text.trim(s), mw.text.trim(e) local sn,...
Click to read more »Module:User:Gommeh/CategoryView
Rabu, 2026-02-18 02:25:41-------------------------------------------------------- local function trim(s) return mw.text.trim(s or "") end local function split(s, sep) s = s or ""...
Click to read more »Module:Govinfo
Minggu, 2026-01-04 23:45:46local p = {} local function trim(s) if s == nil then return nil end return mw.text.trim(tostring(s)) end local function is_nonempty(s) return s ~=...
Click to read more »Module:Good article topics
Rabu, 2014-02-19 15:07:56not topic then return '' end topic = topic:match('^%s*(.-)%s*$') -- Trim whitespace local ret if topic ~= '' then ret = p._main(topic) end ret...
Click to read more »Module:In5
Jumat, 2019-01-25 04:24:24-- Trim whitespace and convert to number. Default to 5 if not present, -- as per the template title. indent = tonumber( mw.text.trim(indent)...
Click to read more »Module:Sandbox/Clockery/reign
Minggu, 2017-12-24 23:18:58= mw.text.trim( frame.args[1] or "" ) .. mw.text.trim( frame.args[2] or "" ) temp2 = mw.text.trim( frame.args[3] or "" ) .. mw.text.trim( frame.args[4]...
Click to read more »Module:Routemap/sandbox
Kamis, 2026-03-26 07:43:54text.trim(tmp[#tmp])) result['linfo3+2'] = mw.text.trim(tmp[#tmp - 1]) if #tmp > 2 then tmp[#tmp - 2] = mw.text.trim(tmp[#tmp - 2]) ...
Click to read more »Module:Choose random TAFI
Jumat, 2019-11-29 03:29:57substring is empty as list begins with a # return mw.text.trim(chosen) -- Trim whitespace before returning else return "Error: Must...
Click to read more »Module:Type in location/sandbox
Jumat, 2023-04-28 01:05:25ustring.gsub(text,'^[%s,]*', '') --trim commas and spaces from beginning text = mw.ustring.gsub(text,'[%s,]*$', '') --trim commas and spaces from end return...
Click to read more »Module:Sandbox/KiharaSofia/zl-interlinear
Minggu, 2026-02-22 03:24:30local p = {} local function trim(text) if text and text ~= '' then -- Trim start text = text:gsub('^[%s]*', '') -- Trim end text = text:gsub('[%s]*$'...
Click to read more »Module:DateI18n/sandbox
Jumat, 2022-10-21 17:07:23type(trim_year)=='nil' then trim_year = '100-999' end local trim = yesno(trim_year,nil) -- convert to boolean if trim==nil and type(trim_year)=='string' then...
Click to read more »Module:Gallery
Senin, 2025-02-10 17:31:44text:gsub("([^%[])%[([^%[%]%s]+)%]", '%1') , encode = "no" } }) end local function trim(s) return mw.ustring.gsub(mw.ustring.gsub(s or '', '%s', ' '), '^%s*(.-)%s*$'...
Click to read more »Module:Unsigned/sandbox
Rabu, 2026-01-21 06:31:44local p = {} local yesno = require('Module:Yesno') local function trim(s) return s:gsub("^%s+", ""):gsub("%s+$", ""):gsub("\226\128\142", "") end function...
Click to read more »Module:NUMBEROF/sandbox
Rabu, 2025-04-02 19:33:11wikitech = 'wikitech.wikimedia.org', } local function trimArg(arg, i) arg = mw.text.trim(arg or '') if arg == '' then if i then error('Parameter...
Click to read more »Module:Sandbox/User:Waddie96/table
Rabu, 2025-10-08 12:44:49cheap_trim(input) if trim_cache[input] then return trim_cache[input] end local trimmed = P.trim_whitespace(input) trim_cache[input] = trimmed return...
Click to read more »Module:Freeze/same page link
Rabu, 2024-02-07 07:41:56_main(args) local page = mw.text.trim(args[1] or '') local pageId = mw.text.trim(args[2] or '') local revTimestamp = mw.text.trim(args[3] or '') local text...
Click to read more »Module:Sandbox/Philipnelson99
Kamis, 2024-03-21 05:36:56rank = trim(x) elseif j == 2 then if x:find("|") then user = trim((split(x,"|")[2]:gsub("%]"...
Click to read more »Module:Class/sandbox
Senin, 2025-06-02 19:32:24require('Module:Arguments') return mArguments.getArgs(frame, { wrappers = wrapper, trim = false, removeBlanks = false }) end local function makeInvokeFunction(func...
Click to read more »Module:Check for deprecated parameters
Kamis, 2025-11-20 18:54:16the list local p = {} local function isnotempty(s) return s and mw.text.trim(s) ~= '' end local function scanValues(values,results,args,replaceTable)...
Click to read more »Module:Sandbox/genewiki/experimental
Jumat, 2015-10-16 07:08:17propertyID = mw.text.trim(frame.args[1] or "") local qualifierID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "")...
Click to read more »Module:Indent
Rabu, 2025-08-13 08:17:33local p = {} function p.indent(frame) -- Trim whitespace from the arguments and remove blank values. local args = {} if type(frame.args) ==...
Click to read more »Module:Internet Archive
Jumat, 2026-05-01 13:57:12trimArg(args.sname) then sname = trimArg(args.sname) end if trimArg(args.dname) then dname = trimArg(args...
Click to read more »Module:Enumerate
Senin, 2024-09-09 00:28:45function p.main(frame) local args = getArgs(frame, { frameOnly = true, trim = true }) return p._main(frame, args) end function p._main(frame,...
Click to read more »Module:ISOdate/sandbox
Jumat, 2020-05-15 03:48:14p._ISOyear( input ) if not input then return '' end input = mw.text.trim( input ) -- if empty string then return it if input == "" then return...
Click to read more »Module:Latest Singapore meetup
Rabu, 2025-04-23 16:00:46secion is" } } -- Trim the output using {{trim}} return frame:expandTemplate{ title = "trim", args = { excerptContent } } end return...
Click to read more »Module:Sandbox/Peter coxhead/Refgen
Rabu, 2023-05-24 00:19:32local functions --[[ Trim leading and trailing spaces, always returning a string. ]] function l.trim(str) str = mw.text.trim(str) if str == nil then...
Click to read more »Module:Text/sandbox
Sabtu, 2025-04-26 19:20:09function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v))...
Click to read more »Module:Sandbox/RexxS/Random
Rabu, 2014-03-12 20:31:08function(frame) local m = tonumber( mw.text.trim(frame.args[1]) ) or 0 local n = tonumber( mw.text.trim(frame.args[2]) ) or 9 local randnum = 0 math...
Click to read more »Module:WLink
Jumat, 2020-10-30 22:03:05if i then r1 = s:sub( 1, i - 1 ); r2 = mw.text.trim( s:sub( i + 1 ) ); if r2 == "" then r2 = false;...
Click to read more »Module:Peg solitaire diagram
Minggu, 2026-03-15 01:08:43|separator=→ -- }} local p = {} local function trim(s) if s == nil then return nil end s = mw.text.trim(tostring(s)) if s == '' then return nil ...
Click to read more »Module:Selected current events
Rabu, 2025-01-01 09:00:51itemIndex + 1 end if more then output = output .. more end return mw.text.trim(output) end function cleanForPatternMatching(wikitext) -- remove wikilink...
Click to read more »Module:Location map/data/CanadaGeo
Sabtu, 2018-03-10 20:55:55return { name = 'CanadaGeo', image = 'Canada_geopolitical_map_trim.jpg', x = '43.337724969237172 - 2.056739941370653*($1 - 90.076056288799123)*sin(0...
Click to read more »Module:Pagelist/sandbox
Rabu, 2026-06-03 08:24:40ipairs(args) do args[i] = origArgs[v] -- Trim whitespace. if type(args[i]) == 'string' then args[i] = mw.text.trim(args[i]) end end -- Get old named...
Click to read more »Module:Sandbox/RexxS/DateBC
Senin, 2015-06-15 00:05:28propertyID = mw.text.trim(frame.args[1] or "") local input_parm = mw.text.trim(frame.args[2] or "") local date_format = mw.text.trim(frame.args[3] or "dmy")...
Click to read more »Module:Sandbox/Black lemon
Sabtu, 2023-03-25 22:50:21page_content[page_name] end end return error_text end local function trim(s) return s:match('^%s*(.-)%s*$') end function p.sectionh(frame) local...
Click to read more »Module:ExcerptHeaderLevel
Senin, 2026-05-04 16:34:59end return n end local function trim(s) return mw.text.trim(tostring(s or '')) end local function isYes(v) v = trim(v):lower() return v == '1' or v...
Click to read more »Module:For loop/sandbox
Kamis, 2025-04-03 23:30:37"Template:For_loop"}) end function p.main(frame) local args = getArgs(frame, { trim = false, removeBlanks = false }) return p._main(args) end function p...
Click to read more »Module:Emoji
Senin, 2024-03-11 06:36:16missing input ]] local function emocode (frame) local emoji_name = mw.text.trim(frame.args[1] or "") -- make sure empty and missing parameters both...
Click to read more »Module:Database report/facade
Kamis, 2026-01-15 20:24:20str:match("%D") then return false end return true end local function trim(s) return s:match("^%s*(.-)%s*$") end p.main = function(frame) local...
Click to read more »Module:Convert default
Senin, 2024-12-23 01:00:46function p.main(frame) local args = getArgs(frame, { frameOnly = true, trim = true }) return p._main(frame, args) end function resolveUnit( unit...
Click to read more »Module:SAFF Club Championship progression
Senin, 2025-12-22 00:01:28-- Module:SAFF Club Championship progression local p = {} local function trim(s) if not s then return "" end return mw.ustring.gsub(s,"^%s*(.-)%s*$","%1")...
Click to read more »Module:Clade/transclude
Jumat, 2025-07-11 22:40:18_section(), _label, etc) local content local title = mw.title.new( mw.text.trim(page)) -- , ns) -- creates object if page doesn't exist (and valid page...
Click to read more »Module:Sandbox/Soccer Tees
Senin, 2024-03-25 19:06:58text.trim(args[currentIdx]), homeWins = tonumber(mw.text.trim(args[currentIdx+1])), homeLosses = tonumber(mw.text.trim(args[currentIdx+2]))...
Click to read more »Module:URL
Kamis, 2025-11-13 05:08:00end end function p._url(url, text, msg) url = mw.text.trim(url or '') text = mw.text.trim(text or '') -- Check for pre-formatted url. Catches '{{url|{{url|google...
Click to read more »Module:SCOTUS-termlist-entry/sandbox
Senin, 2026-05-18 01:02:38else args["case-article"] = nil end if args.page ~= nil and mw.text.trim(args.page) ~= "" then args.page = args.page else args.page = "___" end ...
Click to read more »Module:User:Od1n/If empty (simple Lua)
Minggu, 2025-11-23 10:59:42local args = frame:getParent().args local mwTrim = mw.text.trim for k,v in ipairs(args) do v = mwTrim(v) if v ~= '' then return v end end...
Click to read more »Module:Sandbox/Mensis Mirabilis/gene
Selasa, 2018-11-20 21:16:41handling framework --did we get it from the page local root_qid = mw.text.trim(frame.args['QID'] or "") --try to get it from the args local mm_qid = ""...
Click to read more »Module:Lang
Rabu, 2026-05-13 06:20:12'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing...
Click to read more »Module:Wikidata/sandbox2
Jumat, 2022-10-21 17:02:01local itemID = mw.text.trim(frame.args[1] or "") local propertyID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "")...
Click to read more »Module:Expand wikitext
Rabu, 2019-03-13 04:58:01local pframe = frame:getParent() local code = frame.args[1] if mw.text.trim(mw.text.killMarkers(code)) == "" or yesno(frame.args.unstrip) then code...
Click to read more »Module:Footnotes
Minggu, 2025-03-02 10:29:01through the five positional parameters and trim if set else empty string args[v] = (pframe.args[i] and mw.text.trim (pframe.args[i])) or ''; end if args...
Click to read more »Module:IPAc-nl
Jumat, 2022-06-17 21:01:02for tracking categories local categories = {} -- Trims whitespace from a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- This implements...
Click to read more »Module:Su
Senin, 2024-04-15 09:27:21-- We don't need to trim whitespace from any arguments, as this module only -- uses named arguments, and whitespace is trimmed from them automatically...
Click to read more »Module:Footnotes/anchor id list
Selasa, 2025-01-14 09:04:50rvalue = mw.text.trim (rvalue); -- trim it end if not rvalue or '' == rvalue then -- if rvale was nothing or trimed to nothing ...
Click to read more »Module:Lang/sandbox
Rabu, 2026-05-13 06:17:18'div'; elseif mw.text.trim (text):find ('\n\n+') then -- contains implied p tags text = mw.text.trim (text); -- trim leading and trailing...
Click to read more »Module:Arguments
Rabu, 2020-04-01 13:12:40else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$')...
Click to read more »Module:Word count/doc
Sabtu, 2026-04-18 01:19:58whether the count is below, near, or above the limit. trim When used with supplied text, trims output to the specified word limit. This parameter has...
Click to read more »Module:BibTeX/Sandbox
Jumat, 2026-06-05 20:15:12local function trim(s) if s == nil then return nil end return mw.text.trim(s) end local function strip_outer_braces(s) s = trim(s or "") -- remove...
Click to read more »Module:RfD
Rabu, 2025-04-16 04:48:47makeTransclusionTag(args, redirect) local discussionPage = args[1] and mw.text.trim(args[1]) if not discussionPage or discussionPage == '' then discussionPage...
Click to read more »Module:Wikidata/sandbox3
Jumat, 2022-10-21 17:01:14local itemID = mw.text.trim(frame.args[1] or "") local propertyID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "")...
Click to read more »Module:JSONutil/sandbox
Rabu, 2026-01-28 01:21:41-- Returns: -- string local r if adjust then r = mw.text.trim(mw.text.unstripNoWiki(adjust)) else r = "" end return r end --...
Click to read more »Module:Sandbox/RexxS/PipedCoords
Kamis, 2015-04-09 06:25:56= function(frame) local propertyID = mw.text.trim(frame.args[1] or "") local input_parm = mw.text.trim(frame.args[2] or "") local entity = mw.wikibase...
Click to read more »Module:Sandbox/Greenbreen/MinimumWage
Selasa, 2026-05-05 06:38:00local function trim(s) return s and s:match("^%s*(.-)%s*$") end local function annualize(value, frequency, workweek) frequency = trim(frequency)...
Click to read more »Module:Sandbox/Sameboat/m3
Jumat, 2016-07-08 14:38:00'\n' and '' or '\n') .. '</pre>\n' end function p.trimmer(frame) -- Trims first and last empty icon cell of each row. local org = mw.text.unstripNoWiki(frame...
Click to read more »Module:BibTeX
Jumat, 2026-06-05 20:14:37local function trim(s) if s == nil then return nil end return mw.text.trim(s) end local function strip_outer_braces(s) s = trim(s or "") -- remove...
Click to read more »Module:Table
Minggu, 2025-10-12 09:25:44cheap_trim(input) if trim_cache[input] then return trim_cache[input] end local trimmed = _M.trim_whitespace(input) trim_cache[input]...
Click to read more »Module:Arguments/sandbox
Rabu, 2021-04-21 16:30:15else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$')...
Click to read more »Module:Gallery/sandbox
Jumat, 2025-02-14 05:38:33text:gsub("([^%[])%[([^%[%]%s]+)%]", '%1') , encode = "no" } }) end local function trim(s) return mw.ustring.gsub(mw.ustring.gsub(s or '', '%s', ' '), '^%s*(.-)%s*$'...
Click to read more »Module:Sandbox/Greenbreen/Minimum wage/USD
Selasa, 2026-05-12 06:34:01require("Module:Sandbox/Greenbreen/PPP/data") local p = {} local function trim(s) return s and s:match("^%s*(.-)%s*$") end function p.convert(frame)...
Click to read more »Module:BronMeat/WordLinker
Selasa, 2026-02-10 15:59:58local key = mw.ustring.lower(mw.text.trim(parts[1])) local val = mw.text.trim(parts[2]) custom[key] = val end...
Click to read more »Module:Sandbox/S.A. Julio
Kamis, 2026-06-04 20:05:01local function notBlank(v) return v ~= nil and mw.text.trim(v) ~= '' end local function inMain() return mw.title.getCurrentTitle()...
Click to read more »Module:Sandbox/Bradv/Case
Sabtu, 2020-12-05 13:25:56local find = mw.ustring.find local gmatch = mw.ustring.gmatch local trim = mw.text.trim local prefix = 'Wikipedia:Arbitration/Requests/Case/' local ptalk...
Click to read more »Module:Football event
Jumat, 2026-06-05 08:25:33local function notBlank(v) return v ~= nil and mw.text.trim(v) ~= '' end local function inMain() return mw.title.getCurrentTitle()...
Click to read more »Module:DateI18n
Senin, 2024-04-29 23:20:41type(trim_year)=='nil' then trim_year = '100-999' end local trim = yesno(trim_year,nil) -- convert to boolean if trim==nil and type(trim_year)=='string' then...
Click to read more »Module:Sandbox/Þjarkur/IPAc-is
Sabtu, 2019-01-26 20:55:13require('Module:Category handler').main local categories = {} -- Trims whitespace from a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- This implements...
Click to read more »Module:Pipe escape
Minggu, 2017-08-27 22:57:22out = {} for _, arg in ipairs( f:getParent().args ) do table.insert( out, arg ) end return mw.text.trim( table.concat( out, '|' ) ) end return p...
Click to read more »Module:ISOdate
Senin, 2024-04-29 23:35:41p._ISOyear( input ) if not input then return '' end input = mw.text.trim( input ) -- if empty string then return it if input == "" then return...
Click to read more »Module:Sandbox/Tom Morris
Minggu, 2013-05-19 22:17:52local p = {} p.spouse = function(frame) local spouse_input = mw.text.trim(frame.args[1] or "") if spouse_input == "PARAMETER_NOT_SET" then ...
Click to read more »Module:Excerpt
Jumat, 2026-03-06 19:56:17excerpt local section = Excerpt.getArg( 2, fragment ) section = mw.text.trim( section ) if section == '' then section = nil end if section then excerpt...
Click to read more »Module:Internet Archive/sandbox
Kamis, 2026-05-14 09:50:38trimArg(args.sname) then sname = trimArg(args.sname) end if trimArg(args.dname) then dname = trimArg(args...
Click to read more »Module:XfD old
Sabtu, 2026-05-16 05:06:31sortkey) do out = out .. (makeoutput(k, v) or "") end return mw.text.trim(out) end function p.list(frame) local function listoutput(k, v) return...
Click to read more »Module:Sort title
Kamis, 2020-05-21 02:15:13= string.gsub(title, "%(".. disambiguation .. "%)", "") return mw.text.trim(newTitle) end --[[ Local function which is used to return a title without...
Click to read more »Module:Footnotes/anchor id list/sandbox
Sabtu, 2025-05-24 17:15:09rvalue = mw.text.trim (rvalue); -- trim it end if not rvalue or '' == rvalue then -- if rvale was nothing or trimed to nothing ...
Click to read more »Module:Adjacent stations
Jumat, 2025-10-03 10:27:24local yesno = require('Module:Yesno') local trimq = require('Module:Trim quotes')._trim local boolean = { ['oneway-left'] = true, ['oneway-right']...
Click to read more »Module:Calendar date
Selasa, 2023-08-22 22:32:35--[[--------------------------< trimArg >----------------------- trimArg returns nil if arg is "" while trimArg2 returns 'true' if arg is "" trimArg2 is for args...
Click to read more »Module:If elseif
Sabtu, 2025-11-08 00:10:34yesno) then if yesno(ifval) then return thenval end elseif mw.text.trim(ifval or '') ~= '' then return thenval end until false end p['elseif']...
Click to read more »Module:BaseConvert
Rabu, 2022-04-13 11:58:12return function(frame) local args = frame.args return _convert(mw.text.trim(args[1]), base, from, args.precision, args.width, args.default, args...
Click to read more »Module:File parse
Rabu, 2026-02-04 21:18:26trim(table.concat(buf))) end return tokens end function p.parse(frame) local s = frame.args[1] local key = frame.args[2] s = mw.text.trim(s)...
Click to read more »Module:Wikitable
Minggu, 2025-10-19 01:00:36function p.main(frame) local args = getArgs(frame, {removeBlanks=false, trim=false} ) for k, v in pairs(args) do if type(k) ~= 'number' then buffer:_(string...
Click to read more »Module:Archive URL counts
Senin, 2026-03-16 00:51:57wikimedia', wikisource = 'www.wikisource', } local function trimArg(arg, i) arg = mw.text.trim(arg or '') if arg == '' then if i then ...
Click to read more »Module:Footnotes/whitelist/sort
Sabtu, 2023-10-14 22:26:09for citeref in list[index]:gmatch ('\t*([^\r\n]+)') do citeref = mw.text.trim (citeref); citeref = citeref:gsub (' *%[ *\' *', '[\''); -- normalize...
Click to read more »Module:Sandbox/Aseleste/Indexer/sandbox
Rabu, 2021-01-20 21:25:54{} for key, value in pairs(frame.args) do result[mw.text.trim(key)] = mw.text.trim(unstrip_and_strip_nowiki_tags(value)) end local pframe = frame:getParent()...
Click to read more »Module:Sandbox/RexxS/DateData
Senin, 2015-06-08 07:13:23Lua date table p.parse_date = function(frame) local strdate = mw.text.trim(frame.args[1] or "") local invalid = false local wrd = {} local num...
Click to read more »Module:AutosortTable
Minggu, 2021-02-21 07:27:13strSplit = mw.text.split local strSub = mw.ustring.sub local strTrim = mw.text.trim local seplen = #sep local nsortLookup, descLookup, hiddenLookup...
Click to read more »Module:See also if exists
Jumat, 2025-01-10 03:41:08ipairs(frame:getParent().args) do if (v ~= nil) then local thisArg = mw.text.trim(v) if (thisArg ~= "") then local title = mw.title.new(thisArg, namespace)...
Click to read more »Module:ParameterCount/sandbox
Senin, 2023-02-27 17:40:38passed to it. local yesno = require('Module:Yesno') -- Trim a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- Test whether a...
Click to read more »Module:Cslist
Senin, 2025-05-05 01:00:54embedded:lower() end local out = "" for k, v in ipairs(args) do v = mw.text.trim(v) if v ~= "" then out = out .. "<li>" .. v .. "</li>" end end local...
Click to read more »Module:Sandbox/RexxS/Concat
Sabtu, 2015-03-07 01:08:07propertyID = mw.text.trim(frame.args[1] or "") local qualifierID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "")...
Click to read more »Module:Roman
Kamis, 2023-02-09 03:14:10break end else origArgs = frame end -- Trim whitespace and remove blank arguments. local args = {} for k, v in...
Click to read more »Module:Excerpt/portals
Rabu, 2026-05-13 00:55:29= fixRefs(text, page, full) end -- Trim trailing newlines to avoid appending text weirdly text = mw.text.trim(text) -- Add (Full article...) link...
Click to read more »Module:Cite taxon/utilities
Selasa, 2024-06-04 16:13:57args['nolink'] or frame:getParent().args['nolink'] list = mw.text.trim( list ) local names = mw.text.split( list, "\n" ) -- could use plain...
Click to read more »Module:Sandbox/CX Zoom/TestPage3
Jumat, 2023-06-16 04:27:31-)\n|%s(.-)\n|%s(.-)\n") do rank = mw.text.trim(rank) name = mw.text.trim(name) count = mw.text.trim(count) name = remove_wiki_link (name)...
Click to read more »Module:Sandbox/Rexxs/PropIDs
Jumat, 2016-09-30 00:18:01= function(frame) local propertyID = mw.text.trim(frame.args[1] or "") local input_parm = mw.text.trim(frame.args[2] or "") -- can take a named parameter...
Click to read more »Module:Sidebar
Selasa, 2025-12-30 01:10:22lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]]...
Click to read more »Module:Sidebar/sandbox
Selasa, 2025-12-30 01:00:41lists}} implementation, which passed some parameters through {{#if}} to trim their whitespace. This also triggered the automatic newline behavior. ]]...
Click to read more »Module:Sort title/sandbox
Selasa, 2023-04-11 09:28:22= string.gsub(title, "%(".. disambiguation .. "%)", "") return mw.text.trim(newTitle) end --[[ Local function which is used to return a title without...
Click to read more »Module:Infobox mapframe
Senin, 2025-11-24 11:39:55return DEFAULT_NOOP_OUTPUT end -- Trim whitespace from args, and remove empty args function util.trimArgs(argsTable) local cleanArgs = {} for...
Click to read more »Module:US elections imagemap/utils
Selasa, 2021-09-28 10:54:04{} function p.stripspaces(str) return str:gsub("^%s*(.-)%s*$", "%1") -- trim spaces end function p.split(str, sep) -- split string by separator and return...
Click to read more »Module:IUCN status
Minggu, 2026-04-05 16:01:00local class = mw.text.trim(args[3] or args.class or "") local year = mw.text.trim(args.year or "") local label = mw.text.trim(args.label or "") ...
Click to read more »Module:Str find word
Senin, 2023-04-03 07:35:55words into true/false (module:yesno rules) -- all words returned are trimmed, TODO and all ws into single-plainspace? -- only T/F words are edited...
Click to read more »Module:Settlement short description
Sabtu, 2022-02-12 23:43:02from previous cleanup :gsub('^%s+', '') --trim spaces from beginning :gsub('%s+$', '') --trim spaces from end if parameter:match("[,;]") or...
Click to read more »Module:Sandbox/CX Zoom/WPBS
Sabtu, 2023-02-18 00:14:40{} for t in string.gmatch(content, "(.-)###") do temps[i] = mw.text.trim(t) params[i] = {} params_x[i] = {} params_y[i] = {} Y[i] = {}...
Click to read more »Module:Multilingual/sandbox
Sabtu, 2023-04-08 05:57:34local s storage = mw.text.trim(storage) s = storage:lower() if s:sub(1, 2) == "c:" then storage = mw.text.trim(storage:sub(3)) s = storage:lower()...
Click to read more »Module:ArrayList
Senin, 2025-02-03 02:13:56local p = {} -- Helper function to trim whitespace local function trim(s) return s:match("^%s*(.-)%s*$") end -- Escape special characters in the...
Click to read more »Module:Sandbox/Brilliand
Rabu, 2024-06-26 12:54:49local ret = {} for k, v in pairs(args) do v = split_trim(v, ":") ret[#ret+1] = {split_trim(v[1], ">"), tonumber(v[2]) or 1} end return ret end ...
Click to read more »Module:Sandbox/Premeditated/gallery
Minggu, 2020-06-21 22:12:40{} local templatestyles = 'Template:Gallery/styles.css' local function trim(s) return mw.ustring.gsub(mw.ustring.gsub(s, '%s', ' '), '^%s*(.-)%s*$'...
Click to read more »Module:Sandbox/Ahecht/coords
Jumat, 2025-09-05 00:59:56p = {} function p._split(text) text = mw.ustring.gsub(mw.text.trim(text), "[*′″]", {['*'] = '°', ['′'] = "'", ['″'] = '"'}) local lat, long local regexes...
Click to read more »Module:Calendar date/sandbox
Jumat, 2022-10-21 17:06:44--[[--------------------------< trimArg >----------------------- trimArg returns nil if arg is "" while trimArg2 returns 'true' if arg is "" trimArg2 is for args...
Click to read more »Module:Database report/facade/sandbox
Jumat, 2025-09-19 03:38:16str:match("%D") then return false end return true end local function trim(s) return s:match("^%s*(.-)%s*$") end p.main = function(frame) local...
Click to read more »Module:Params/doc/examples
Senin, 2025-09-29 21:12:26authors/doc tablebox tablebox/doc tablebox/row tablebox/styles.css trim and call trim and call/doc universal page list universal page list/doc watchlist...
Click to read more »Module:Su/sandbox
Minggu, 2024-07-14 03:53:03-- We don't need to trim whitespace from any arguments, as this module only -- uses named arguments, and whitespace is trimmed from them automatically...
Click to read more »Module:Respell
Kamis, 2019-08-15 00:08:51p._main(args) local ret = {} for i, v in ipairs(args) do v = mw.text.trim(v) -- Compatibility: Ignore arguments that only contain an apostrophe ...
Click to read more »Module:Sandbox/NorthPark1417/Backlinks
Rabu, 2019-04-17 13:09:31{} local templatestyles = 'Template:Gallery/styles.css' local function trim(s) return mw.ustring.gsub(mw.ustring.gsub(s, '%s', ' '), '^%s*(.-)%s*$'...
Click to read more »Module:Sandbox/Mps/Test
Rabu, 2014-10-22 20:31:39= function(frame) local propertyID = mw.text.trim(frame.args[1] or "") local input_parm = mw.text.trim(frame.args[2] or "") if input_parm == "FETCH_WIKIDATA"...
Click to read more »Module:Excerpt slideshow
Minggu, 2024-08-18 18:19:31local processBraces = function(t) local isTable = mw.ustring.sub(mw.text.trim(t), 2, 2) == '|' if isTable then return '' end -- else it's a template...
Click to read more »Module:Sandbox/Nardog/IPAc-ro
Senin, 2020-07-13 08:56:22for tracking categories local categories = {} -- Trims whitespace from a string local function trim(s) return s:match('^%s*(.-)%s*$') end -- This implements...
Click to read more »Module:Sandbox/CX Zoom/WPBS 2
Sabtu, 2023-02-18 00:06:35{} for t in string.gmatch(content, "(.-)###") do temps[i] = mw.text.trim(t) params[i] = {} params_x[i] = {} params_y[i] = {} Y[i] = {}...
Click to read more »Module:Sandbox/Theklan/PipedCoords
Jumat, 2015-04-10 01:29:06= function(frame) local propertyID = mw.text.trim(frame.args[1] or "") local input_parm = mw.text.trim(frame.args[2] or "") local entity = mw.wikibase...
Click to read more »Module:Sandbox/DVRTed
Rabu, 2025-12-10 19:10:31= require('Module:Section link')._main -- helper functs local function trim(s) return s:match("^%s*(.-)%s*$") end local function case_insensitive_pattern(str)...
Click to read more »Module:Sandbox/Jts1882/Test
Selasa, 2023-03-28 22:44:59--output = output .. trimmedTree --output = output .. "<pre>" .. trimmedTree .. "</pre>" fullOutput = trimmedTree ...
Click to read more »Module:URL/sandbox
Selasa, 2025-11-11 02:54:01end end function p._url(url, text, msg) url = mw.text.trim(url or '') text = mw.text.trim(text or '') -- Check for pre-formatted url. Catches '{{url|{{url|google...
Click to read more »Module:Check bibcode
Sabtu, 2022-10-22 04:03:05check_bibcode (frame) local err_type = bibcode (mw.text.trim (frame.args[1])); -- trim leading and trailing white space before evaluation if err_type...
Click to read more »Module:Sandbox/Tary123
Sabtu, 2017-12-30 02:10:49start1 = start1 or "?" finish1 = finish1 or "" start1 = trim(start1) finish1 = trim(finish1) if start1 == "" then start1 = "?" end if string...
Click to read more »Module:Sandbox/trappist the monk/ac code
Senin, 2022-10-24 04:00:06({"'" .. iata .. "'", "'" .. icao .. "'", "'" .. mw.text.trim(iata_name) .. "'", "'" .. mw.text.trim(wiki_name) .. "'"}, ', ')); table.insert (temp_table...
Click to read more »Module:Footnotes/sandbox
Jumat, 2025-05-16 04:41:13through the five positional parameters and trim if set else empty string args[v] = (pframe.args[i] and mw.text.trim (pframe.args[i])) or ''; end if args...
Click to read more »Module:Month translator
Sabtu, 2022-10-22 11:19:11from the pattern table go here c1, c2, c3 = mw.ustring.match (mw.text.trim (args_t[1]), pattern[1]); -- one or more captures set if source matches patterns[i][1])...
Click to read more »Module:RfX tally
Kamis, 2021-10-07 01:23:14rfx = require("Module:Rfx") function p.main(frame) local title = mw.text.trim(frame.args[1]) local obj if title == nil or #title == 0 then obj = rfx...
Click to read more »Module:Discussion ping
Jumat, 2024-09-20 23:52:58-- if not trimmed then -- toProcess = mw.ustring.sub( toProcess, 0, -- mw.ustring.len( toProcess ) - 2 ) -- trimmed = true -- ...
Click to read more »Module:Category handler
Rabu, 2020-04-01 13:12:40-------------------------------------------------------- local function trimWhitespace(s, removeBlanks) if type(s) ~= 'string' then return s end ...
Click to read more »Module:Sandbox/Nardog/4
Minggu, 2020-07-05 18:20:36gmatch local gsub = mw.ustring.gsub local sub = mw.ustring.sub local trim = mw.text.trim local function multiFind(s, t) local i, j = find(s, t[1]) for...
Click to read more »Module:Sandbox/extract database report
Sabtu, 2026-04-11 00:01:07---@return string local function trim(value) if type(value) ~= "string" then return "" end return mw.text.trim(value) end ---@param message...
Click to read more »Module:XfD old/sandbox
Minggu, 2023-07-30 03:07:47sortkey) do out = out .. (makeoutput(k, v) or "") end return mw.text.trim(out) end function p.list(frame) local function listoutput(k, v) return...
Click to read more »Module:Sandbox/Ahecht/Catalog lookup link
Selasa, 2018-07-17 22:18:50parameters and trim whitespace for k, v in pairs(frame:getParent().args) do if v and mw.ustring.match(v,'%S') then args[k] = mw.text.trim(v) end end...
Click to read more »Module:Sandbox/Mr. Stradivarius/sandbox4
Selasa, 2024-03-26 14:34:06-- Trim whitespace and remove blank arguments. local args = {} for k, v in pairs(origArgs) do if type(v) == 'string' then v = mw.text.trim(v) ...
Click to read more »Module:Unsubst
Sabtu, 2021-10-09 01:22:16v in pairs( frame:getParent().args ) do args[k] = v end end -- Trim parameters, if not specified otherwise if not string.find( ','..(frame.args['$flags']...
Click to read more »Module:Respell/sandbox
Kamis, 2019-08-15 00:08:24p._main(args) local ret = {} for i, v in ipairs(args) do v = mw.text.trim(v) -- Compatibility: Ignore arguments that only contain an apostrophe ...
Click to read more »Module:Check for deprecated parameters/sandbox
Kamis, 2025-11-20 18:52:48the list local p = {} local function isnotempty(s) return s and mw.text.trim(s) ~= '' end local function scanValues(values,results,args,replaceTable)...
Click to read more »Module:Sandbox/GreenC/Internet Archive author
Senin, 2014-10-13 06:48:56= mw.text.trim(args.name) dname = name sname = dname end if args.sname ~= nil and args.sname ~= "" then sname = mw.text.trim(args.sname)...
Click to read more »Module:Sandbox/Blippy1998
Sabtu, 2026-05-02 13:57:22for _, outLine in ipairs(lines) do local line = mw.text.trim(outLine) -- Equivalent to skipping via 'continue' ...
Click to read more »Module:Var
Sabtu, 2025-12-20 11:08:38gsub local trim = mw.text.trim local split = mw.text.split local function _test_cmd(cmd_names, test) local result, trim_test = false, trim(lib_str.lower(test))...
Click to read more »Module:SST
Sabtu, 2026-04-18 10:30:05then -- Trim whitespace so "|chapter= 8 " matches key ['8'] local clean_input = mw.text.trim(tostring(user_input)) ...
Click to read more »Module:Vgrtbl
Sabtu, 2021-06-12 23:15:45_text(args[2], args[1], v, 1) local i = 3 while args[i] and mw.text.trim(args[i]) ~= '' do retval = retval .. '<br />' .. p._text(args[i + 1],...
Click to read more »Module:FindYDCportal
Sabtu, 2026-02-14 05:40:38ordinal[tonumber(digit)] else return n .. "th" end end function trim(s) return s:match "^%s*(.-)%s*$" end function p.findydcportal(frame)...
Click to read more »Module:Sandbox/Kid116/Reign
Rabu, 2017-12-27 00:22:03o1 = mw.text.trim(frame.args[1]) if o1 == "" then o1 = 0 end else o1 = 0 end local s2 if frame.args[2] then s2 = mw.text.trim(frame.args[2])...
Click to read more »Module:Infobox gene
Rabu, 2025-02-05 02:58:46return("'''VALUE_ERROR''' (" .. tostring(val) .. ")") end end local function trim(s) return (s:gsub("^%s*(.-)%s*$", "%1")) end --texts relevant to localization...
Click to read more »Module:Roman/sandbox
Rabu, 2025-01-01 20:22:41break end else origArgs = frame end -- Trim whitespace and remove blank arguments. local args = {} for k, v in...
Click to read more »Module:Sandbox/Fred Gandt/sgd
Minggu, 2025-09-07 00:51:45if desc then return ' <span style="font-size:85%">(' .. mw.text.trim(desc) .. ')</span>' -- Not ideal if substituted end return '' end --...
Click to read more »Module:InfoboxImage/sandbox
Kamis, 2026-06-04 23:55:51image = mw.ustring.gsub(image, "([^|]*)|.*", "%1") end -- Trim spaces and strip prefix if exists image = stripNamespace(image) ...
Click to read more »Module:Sandbox/Nihiltres/Category manager
Rabu, 2020-01-08 15:19:19catList, 'table') checkType('addCategory', 2, name, 'string') name = mw.text.trim(name) checkType('addCategory', 3, sortKey, 'string', true) if #name ==...
Click to read more »Module:See also if exists/sandbox
Sabtu, 2020-10-03 23:04:29ipairs(frame:getParent().args) do if (v ~= nil) then local thisArg = mw.text.trim(v) if (thisArg ~= "") then local title = mw.title.new(thisArg, namespace)...
Click to read more »Module:Check DYK hook
Minggu, 2020-11-29 19:31:57error("No hook specified") end hook = hook:match('^%s*(.-)%s*$') -- Trim whitespace if p._isValidHook(hook) then return "yes" else return ""...
Click to read more »Module:Cslist/sandbox
Sabtu, 2025-03-15 00:13:59= args.bold local out = "" for k, v in ipairs(args) do v = mw.text.trim(v) if v ~= "" then out = out .. "<li>" .. v .. "</li>" end end local...
Click to read more »Module:Sandbox/Chlod/sandbox
Sabtu, 2023-05-13 10:29:49require('Module:Arguments').getArgs local p = {} function p.main(frame) mw.logObject(getArgs(frame, { frameOnly = true, trim = true })) end return p...
Click to read more »Module:Word count
Selasa, 2026-05-26 00:29:36showcount whether to show the word count -- @param {boolean} frame.args.trim Whether to trim at the word count limit -- @param {boolean} frame.args.unsubst Whether...
Click to read more »Module:Extract short description
Sabtu, 2022-10-22 04:19:43in '.. article_title .. '</span>'; end return mw.text.trim (text), true; -- trim whitespace and done -- preprocess the...
Click to read more »Module:WikitextParser
Rabu, 2026-02-11 21:45:12wikitext wikitext = string.gsub( wikitext, '\n==.*', '' ) wikitext = mw.text.trim( wikitext ) return wikitext end -- Get the sections from the given wikitext...
Click to read more »Module:Sandbox/Aseleste/Indexer
Kamis, 2021-01-21 09:45:11local result = {} for key, value in pairs(frame.args) do result[mw.text.trim(key)] = unstrip_and_strip_nowiki_tags(value) end local pframe = frame:getParent()...
Click to read more »Module:Seplist
Sabtu, 2019-06-22 22:24:33= "<hr>" end local out = {} for k, v in ipairs(args) do v = mw.text.trim(v) table.insert(out, "<li>" .. v .. "</li>") end if #out > 0 then return...
Click to read more »Module:Category more if exists
Minggu, 2023-02-26 14:08:35ipairs(frame:getParent().args) do if (v ~= nil) then local thisArg = mw.text.trim(v) if (thisArg ~= "") then local title = mw.title.new(thisArg, namespace)...
Click to read more »Module:Sandbox/RexxS/Blacklist
Sabtu, 2017-11-04 05:54:33wrd in string.gmatch(blacklist, "[^,;]+") do if fieldname == mw.text.trim(wrd) then blacklisted = true break end end if blacklisted...
Click to read more »Module:Infobox mapframe/sandbox
Senin, 2026-02-02 23:39:37return DEFAULT_NOOP_OUTPUT end -- Trim whitespace from args, and remove empty args function util.trimArgs(argsTable) local cleanArgs = {} for...
Click to read more »Module:Category disambiguation
Jumat, 2025-11-28 03:45:11pagesInCategory local remove = table.remove local sort = table.sort local trim = mw.text.trim local yesno = require("Module:Yesno") local title = mw.title.getCurrentTitle()...
Click to read more »Module:Charmap
Selasa, 2021-12-14 03:45:2611 255" local function hex2dec_words(s) local x = mw.text.split(mw.text.trim(s or ''), '%s+') if #x == 1 and x[1] == '' then return '' end for i = 1...
Click to read more »Module:Highest archive number
Selasa, 2019-10-08 22:47:04main(frame) local args = require('Module:Arguments').getArgs(frame, { trim = false, removeBlanks = false, wrappers = 'Template:Highest archive number'...
Click to read more »Module:ChoroplethMap
Jumat, 2026-05-29 19:52:11key and mw.text.trim( value ) ~= '' then return value end end for k, value in pairs( frame.args ) do if k == key and mw.text.trim( value ) ~= ''...
Click to read more »Module:Template parameter value
Kamis, 2025-10-23 22:11:46trim(parts[1]) local value if #parts == 1 then value = key count = count + 1 key = tostring(count) else value = mw.text.trim(table...
Click to read more »Module:Sandbox/Izno/Word counter
Selasa, 2023-12-26 10:18:35return nums end local function trim_args(args) local new_args = {} for k,v in pairs(args) do new_args[k] = mw.text.trim(v) end return new_args end...
Click to read more »Module:Math
Jumat, 2026-04-10 21:26:08it. number_string = number_string:match("^%+(.*)$") or number_string -- Trim any leading + signs. if number_string:find('^%-?0[xX]') then -- Number...
Click to read more »Module:ChoroplethMap/sandbox
Jumat, 2026-05-29 19:48:25key and mw.text.trim( value ) ~= '' then return value end end for k, value in pairs( frame.args ) do if k == key and mw.text.trim( value ) ~= ''...
Click to read more »Module:Params/doc
Jumat, 2026-06-05 00:19:20have one of the following values: trim_none, trim_named, trim_positional, trim_all. If omitted, it defaults to trim_named. The iteration delimiter setter...
Click to read more »Module:Check winner by scores/testcases
Senin, 2026-03-09 23:01:32trim(expected), mw.text.trim(actual), nil, 1) end function suite:assertErr(actual) self:assertEquals(mw.text.trim('Result unknown'), mw.text.trim(actual)...
Click to read more »Module:Selected recent additions
Senin, 2026-03-16 11:37:42'\n') end if more then output = output .. more end return mw.text.trim(output) end function cleanForPatternMatching(wikitext) -- remove wikilink...
Click to read more »Module:Settlement short description/sandbox
Jumat, 2023-09-29 17:44:20from previous cleanup :gsub('^%s+', '') --trim spaces from beginning :gsub('%s+$', '') --trim spaces from end if parameter:match("[,;]") or...
Click to read more »Module:Template link general
Kamis, 2026-02-12 18:19:37then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower()...
Click to read more »Module:Str find word/sandbox
Jumat, 2023-04-21 15:19:06s = mw.ustring.gsub( mw.text.trim( s ), '^%\"(.*)%\"$', '%1' ) end if bTrimAfter == true then s = mw.text.trim( s ) end return s end -- separator-in...
Click to read more »Module:Resolve category redirect
Jumat, 2026-01-23 21:19:40local p = {} local function cleanup( rtarget ) rtarget = mw.text.trim( rtarget ) rtarget = mw.ustring.gsub( rtarget, '^1%s*=%s*', '' ) rtarget = string...
Click to read more »Module:Sandbox/Hellknowz/Test
Senin, 2013-09-16 16:24:11return mw.text.trim(matchStrip) end matchStrip = value:match('^([^<]-){{[Ff]lag ?icon[^}]+}}$') if (matchStrip) then return mw.text.trim(matchStrip)...
Click to read more »Module:Gadgets
Kamis, 2025-10-02 05:38:19pageList = string.match(def, pattern) if name then name = mw.text.trim(name) end -- Process options string into a Lua table local options...
Click to read more »Module:Arguments/testcases
Jumat, 2026-01-30 21:37:58'uniqueParentArgKey' -- Trimming and whitespace values. -- Whitespace gets trimmed from named parameters, so keys for these need -- to be numbers to make...
Click to read more »Module:Carousel
Jumat, 2019-05-31 06:04:05dataname; if missing, use default local dataname = frame.args.name or mw.text.trim(frame.args[1]) or "" if dataname == "" then dataname = "Komodobish" end...
Click to read more »Module:Category series navigation
Selasa, 2025-12-09 01:35:27displaytext, displayend, listoverride ) cat = mw.text.trim(cat or '') displaytext = mw.text.trim(displaytext or '') displayend = displayend or false...
Click to read more »Module:Alhatorah/sandbox
Rabu, 2021-06-23 23:43:23'e/et/et', }, } local function trimArg(text) if type(text) == 'string' then text = text:match('(%S.-)%s*$') --trimmed text or nil if empty end return...
Click to read more »Module:Main if exists
Selasa, 2024-07-09 01:00:31ipairs(frame:getParent().args) do if (v ~= nil) then local thisArg = mw.text.trim(v) if (thisArg ~= "") then local title = mw.title.new(thisArg, namespace)...
Click to read more »Module:Bibleverse
Sabtu, 2025-10-18 19:59:27'bible.cc', } } local function trimArg(text) if type(text) == 'string' then text = text:match('(%S.-)%s*$') --trimmed text or nil if empty end return...
Click to read more »Module:Sandbox/RexxS/Watchlist
Kamis, 2020-02-27 06:38:33ttlobj:getContent() local out = "" for ttl in cont:gmatch("%C*") do ttl = mw.text.trim(ttl) if ttl ~= "" then local qid = mw.wikibase.getEntityIdForTitle(ttl)...
Click to read more »Module:Sandbox/Codename Lisa/wbr test
Minggu, 2014-11-30 21:12:38parse(frame) local templateArgs = frame.args local s = templateArgs[1] or '' --Trim leading and trailing white space s = mw.ustring.gsub(s, "^%s*(.-)%s*$",...
Click to read more »Module:WikitextParser/sandbox
Jumat, 2026-05-15 21:48:42section titles wikitext = mw.text.trim( wikitext ) for paragraph in mw.text.gsplit( wikitext, '\n\n+' ) do if mw.text.trim( paragraph ) ~= '' then table...
Click to read more »Module:Aircraft by nationality
Rabu, 2025-02-05 06:19:17linking function catlink( name, disp ) name = mw.text.trim(name or '') disp = mw.text.trim(disp or '') local grey = '#888' local exists = mw.title...
Click to read more »Module:Rugby box
Kamis, 2023-01-26 03:32:15isnotempty(s) return s and s:match( '^%s*(.-)%s*$' ) ~= '' end local function trim(s) if isnotempty(s) then s = s:match('^[\'"%s]*(.-)[\'"%s]*$') return...
Click to read more »Module:Check DYK hook/sandbox
Minggu, 2020-11-29 19:28:27error("No hook specified") end hook = hook:match('^%s*(.-)%s*$') -- Trim whitespace if p._isValidHook(hook) then return "yes" else return ""...
Click to read more »Module:Change
Selasa, 2023-04-11 10:52:07'♠"></span>' end local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and trim(s) ~= '' end function change(args)...
Click to read more »Module:Charmap/sandbox
Selasa, 2021-12-14 03:42:3311 255" local function hex2dec_words(s) local x = mw.text.split(mw.text.trim(s or ''), '%s+') if #x == 1 and x[1] == '' then return '' end for i = 1...
Click to read more »Module:Footnotes/whitelist/sort/sandbox
Jumat, 2024-11-29 01:46:22for citeref in list[index]:gmatch ('\t*([^\r\n]+)') do citeref = mw.text.trim (citeref); citeref = citeref:gsub (' *%[ *\' *', '[\''); -- normalize...
Click to read more »Module:Resolve category redirect/sandbox
Jumat, 2026-01-23 23:54:17local p = {} local function cleanup( rtarget ) rtarget = mw.text.trim( rtarget ) rtarget = mw.ustring.gsub( rtarget, '^1%s*=%s*', '' ) rtarget = string...
Click to read more »Module:Ustring/doc
Sabtu, 2026-01-31 05:42:56inserting \ at the beginning of the string. Note that MediaWiki will always trim whitespace from named arguments; to give arguments with surrounding whitespace...
Click to read more »Module:Factorization
Kamis, 2026-02-26 01:39:54big = frame.args['big'] and true local serif = frame.args['serif'] and true return mw.text.trim(format(result, bold, big, serif)) end return p...
Click to read more »Module:URLutil
Sabtu, 2022-12-10 00:12:27r = mw.text.trim( url:sub( i ) ):sub( 2 ) if type( decode ) == "string" then local encoding = mw.text.trim( decode ) ...
Click to read more »Module:Adjacent stations/OC Transpo/sandbox
Jumat, 2025-02-07 22:53:18"ffffff", ["left terminus"] = "Tunney's Pasture", ["right terminus"] = "Trim", ["note-mid"] = "Opens 2025", }, ["1W"] = { ["title"] = "[[Confederation...
Click to read more »Module:Template link general/sandbox
Sabtu, 2026-02-07 00:02:18then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower()...
Click to read more »Module:BaseConvert/sandbox
Selasa, 2022-04-12 14:18:47return function(frame) local args = frame.args return _convert(mw.text.trim(args[1]), base, from, args.precision, args.width, args.default, args...
Click to read more »Module:Ifexist
Sabtu, 2026-01-03 17:42:08tidyValNoChange(value) return value end local function tidyValTrim(value) return mw.text.trim(value) end function p.main(frame) if type(yesno) ~= type(tonumber)...
Click to read more »Module:Sandbox/AmazingJus
Jumat, 2024-11-15 20:43:30lowercase entry = " " .. entry .. " " -- make all word borders have a space -- rest of code goes here return mw.text.trim(entry) end return export...
Click to read more »Module:Switcher
Selasa, 2025-08-19 01:00:37:addClass('switcher-label') :css('display', 'none') :wikitext(mw.text.trim(args[i + 1] or '')) if i == default then span:attr('data-switcher-default'...
Click to read more »Module:Icon
Jumat, 2026-01-30 13:27:05local iconData if code then code = code:match('^%s*(.-)%s*$'):lower() -- trim whitespace and put in lower case iconData = data[code] end if not iconData...
Click to read more »Module:Adjacent stations/sandbox
Jumat, 2026-03-13 19:56:20local yesno = require('Module:Yesno') local trimq = require('Module:Trim quotes')._trim local boolean = { ['oneway-left'] = true, ['oneway-right']...
Click to read more »Module:Urltowiki
Jumat, 2019-11-08 12:05:32display = nil end end if display then display = mw.text.trim(display) -- Trim whitespace. -- If the page name is the same as the display value...
Click to read more »Module:Ns has subpages
Sabtu, 2024-02-17 11:01:43frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns...
Click to read more »Module:Television infoboxes disambiguation check
Senin, 2025-12-22 19:01:57disambiguation:match(p.pattern) isAdjectiveValid = validateCountryAdjective(mw.text.trim(adjective)) isSeasonNumberValid = validateSeasonNumber(seasonNumber)...
Click to read more »Module:STikiLeaderboard
Kamis, 2024-07-25 12:39:38frame.args[1] or '' username = mw.getContentLanguage():ucfirst(mw.text.trim(username)) if username == '' then error('No username specified') ...
Click to read more »Module:Gadgets/sandbox
Senin, 2025-11-03 11:14:57pageList = string.match(def, pattern) if name then name = mw.text.trim(name) end -- Process options string into a Lua table local options...
Click to read more »Module:GetParameters
Selasa, 2024-11-26 04:58:30return boolean_value end function p.defined(frame) local arg = mw.text.trim(frame.args[1]) --if arg == tostring(tonumber(arg)) then -- undesired result...
Click to read more »Module:Mapframe
Senin, 2026-06-01 22:40:49end --[[ Trim whitespace from args, and remove empty args. Also fix control characters. @param {table} argsTable @returns {table} trimmed args table...
Click to read more »Module:Format TemplateData
Minggu, 2026-02-08 09:48:03r1 = elements end elseif s == "string" then s = mw.text.trim(about) if s ~= "" then r1 = {} table.insert(r1, { code =...
Click to read more »Module:Sandbox/Dalba/Num2wordfa
Minggu, 2016-09-25 21:07:58run(frame) number = mw.text.trim(frame.args[1]) if string.sub(number,1,1) == '-' then sign = 'منفی ' number = mw.text.trim(string.sub(number,2)) else...
Click to read more »Module:Diacritics
Sabtu, 2018-11-17 20:26:08p.convertChar = function(frame) local ch = frame.args.char or mw.text.trim(frame.args[1]) or "" return char_idx[ch] or ch end p.strip_diacrits =...
Click to read more »Module:Category handler/sandbox
Minggu, 2020-05-17 21:35:33-------------------------------------------------------- local function trimWhitespace(s, removeBlanks) if type(s) ~= 'string' then return s end ...
Click to read more »Module:Probox
Selasa, 2023-06-13 00:55:51local pagelang = mw.text.trim(frame:callParserFunction{name='#translation', args="1"}) -- local pagelang = "/" .. mw.text.trim(frame:expandTemplate{ti...
Click to read more »Module:If elseif/sandbox
Sabtu, 2025-11-08 00:10:34function(frame) local args = require('Module:Arguments').getArgs(frame, {trim = false, removeBlanks = false}) return p['elseif'](args) end p[''] = p['elseif']...
Click to read more »Module:Sandbox/pppery/massrfd
Kamis, 2021-05-06 05:18:23output; end -- p= p:gsub("^.*(Wikipedia:.-) %(.*$","%1") p = mw.text.trim(p) local q = mw.title.new(p):getContent() if q ~= nil then q = q:gsub("...
Click to read more »Module:CricketLeagueProgression/sandbox
Kamis, 2015-01-08 03:24:31"partial table-partial" } local elimColour = "#DCDCDC" -- Eliminated function trim(s) if not s then return nil else return (mw.ustring...
Click to read more »Module:Twenty20 League results summary
Sabtu, 2026-04-11 21:15:09= mw.text.split local strFormat = string.format local strTrim = mw.text.trim local strSub = string.sub local strUpper = string.upper ...
Click to read more »Module:Road data/locations
Minggu, 2024-08-25 01:00:12require("Module:Road data/util") local format = mw.ustring.format local trim = mw.text.trim local parser = parserModule.parser local function stateName(args)...
Click to read more »Module:Road data/locations/sandbox
Sabtu, 2024-08-24 04:49:37require("Module:Road data/util") local format = mw.ustring.format local trim = mw.text.trim local parser = parserModule.parser local function stateName(args)...
Click to read more »Module:Infobox gene/sandbox
Selasa, 2025-02-04 22:50:47return("'''VALUE_ERROR''' (" .. tostring(val) .. ")") end end local function trim(s) return (s:gsub("^%s*(.-)%s*$", "%1")) end --texts relevant to localization...
Click to read more »Module:ICCProgression
Sabtu, 2026-04-11 21:56:09= mw.text.split local strFormat = string.format local strTrim = mw.text.trim local strSub = string.sub local strUpper = string.upper ...
Click to read more »Module:RFX report
Minggu, 2025-10-05 04:35:50not float or mw.text.trim(float) == '' then float = nil end local clear = args.clear if not clear or mw.text.trim(clear) == '' then ...
Click to read more »Module:Urltowiki/sandbox
Kamis, 2023-04-13 03:15:12display = nil end end if display then display = mw.text.trim(display) -- Trim whitespace. -- If the page name is the same as the display value...
Click to read more »Module:RfD/sandbox
Sabtu, 2025-02-22 02:24:11makeTransclusionTag(args, redirect) local discussionPage = args[1] and mw.text.trim(args[1]) if not discussionPage or discussionPage == '' then discussionPage...
Click to read more »Module:Sandbox/Nardog/11
Kamis, 2020-05-14 21:57:16local p = {} function p.main(frame) local s = frame.args[1] s = mw.text.trim(s) if s and s ~= '' then local date = s:match('%d%d:%d%d, %d%d? %u%l+...
Click to read more »Module:Sandbox/S-1-5-7/versiontests
Jumat, 2020-03-13 14:56:05non-greedy captures, so just -- strip the whitespaces version = mw.text.trim(version) -- sometimes there is text that is put in front of it like --...
Click to read more »Module:TaxonItalics
Selasa, 2021-10-05 13:34:24p.italicizeTaxonName(name, linked, abbreviated, dab) name = mw.text.trim(name) -- if the name begins with '[', then assume formatting is present...
Click to read more »Module:Political party
Sabtu, 2026-02-21 23:27:56end local function stripToNil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example...
Click to read more »Module:Icon/sandbox
Jumat, 2026-01-30 13:16:00local iconData if code then code = code:match('^%s*(.-)%s*$'):lower() -- trim whitespace and put in lower case iconData = data[code] end if not iconData...
Click to read more »Module:AutosortTable/sandbox
Minggu, 2021-02-21 07:17:00strSplit = mw.text.split local strSub = mw.ustring.sub local strTrim = mw.text.trim local seplen = #sep local nsortLookup, descLookup, hiddenLookup...
Click to read more »Module:Shogi diagram
Minggu, 2024-12-22 23:50:29makeTD() function function processString(ss) -- strip whitespace ss = mw.text.trim(ss) -- special matches for arrows (n = north, s = south, etc.) -- NOTE:...
Click to read more »Module:Infobox date field metadata
Selasa, 2019-02-26 06:17:07trim(matchStrip) end matchStrip = value:match('^([^<]-)<ref[^>]*/>$') -- basic named ref (quite common) if (matchStrip) then return trim(matchStrip)...
Click to read more »Module:Multi-section link
Senin, 2024-12-09 18:03:49valueFunc = function (key, value) value = value:match('^%s*(.-)%s*$') -- Trim whitespace -- Allow blank first parameters, as the wikitext template does...
Click to read more »Module:Hatnote
Selasa, 2025-03-18 22:47:33getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') ...
Click to read more »Module:FindYDCportal/sandbox
Rabu, 2019-10-02 18:11:37ordinal[tonumber(digit)] else return n .. "th" end end function trim(s) return s:match "^%s*(.-)%s*$" end function p.findydcportal(frame)...
Click to read more »Module:Portal pictures
Jumat, 2021-11-19 07:00:17functions == local function getCleanArgs(frame) return getArgs(frame, { trim = true, removeBlanks = true }) end local function wikiError(message)...
Click to read more »Module:Sandbox/Raph Williams65/Switch
Sabtu, 2025-04-05 14:12:46"" then local sCase = (tArgs[1] or "") sCase = mw.text.trim(sCase) if tonumber(sCase) then sCase = tonumber(sCase)+1...
Click to read more »Module:Events by year for decade
Selasa, 2023-05-30 03:35:57and 'na' or 'n'}} local section = '== ' .. year .. '==\n' .. mw.text.trim( frame:expandTemplate{ title ='transcluded section', args = { year2 }}...
Click to read more »Module:Template parameter value/sandbox
Kamis, 2025-10-23 22:00:38trim(parts[1]) local value if #parts == 1 then value = key count = count + 1 key = tostring(count) else value = mw.text.trim(table...
Click to read more »Module:Ns has subpages/sandbox
Jumat, 2016-06-17 07:51:09frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns...
Click to read more »Module:Sandbox/Matroc/ConvertRomanDate
Rabu, 2013-06-26 14:59:13end input = input:upper() input = input:match'^%s*(.*%S)' -- trim spaces at both ends local err = (string.gsub(input,"[MDCLXVI]","")) ...
Click to read more »Module:Highest archive number/sandbox
Selasa, 2019-10-01 22:01:53main(frame) local args = require('Module:Arguments').getArgs(frame, { trim = false, removeBlanks = false, wrappers = 'Template:Highest archive number'...
Click to read more »Module:Sandbox/Animal lover 666/position data
Rabu, 2021-01-06 14:11:03font-size:95%\"\n" local i=1 while args[i] do local name=mw.text.trim(args[i+1]) if name~="blank" then str=str.."|-\n|"..args[i] if args[i]~=args[i+2]...
Click to read more »Module:Footballer positions
Sabtu, 2025-12-27 04:46:02mw.text.trim(input) == "" then return "" end -- Normalize HTML entities input = decodeEntities(input) -- Trim input = mw.text.trim(input) ...
Click to read more »Module:A or an
Selasa, 2020-05-19 02:06:15true end end end function p._main(args) local s = args[1] and mw.text.trim(args[1]) local pron = 'a' local ret = '' if s and s ~= '' then local...
Click to read more »Module:Bibleverse/sandbox
Kamis, 2026-03-12 07:10:53'bible.cc', } } local function trimArg(text) if type(text) == 'string' then text = text:match('(%S.-)%s*$') --trimmed text or nil if empty end return...
Click to read more »Module:R/sandbox
Kamis, 2026-04-23 20:49:55hyphen_to_dash local lang = require('Module:Lang') local trim_quotes = require('Module:trim quotes')._trim local getArgs = require('Module:Arguments').getArgs...
Click to read more »Module:Sandbox/Evad37/Auto footer links
Minggu, 2019-02-24 09:52:36-)%s*$') if val ~= '' then trimmedArgs[key] = val end else trimmedArgs[key] = val end end return trimmedArgs end p.getWdValue = function(property_id...
Click to read more »Module:Findimage
Sabtu, 2020-11-21 01:50:52= v end -- first unnamed parameter or |title= local title = mw.text.trim(args[1] or args.title or "", "\t\r\n\f %[%]") local titleobj if title ==...
Click to read more »Module:Sandbox/RexxS/Dates
Senin, 2018-11-12 00:19:42"Valid" end function p.dayTry(frame) local date = frame.args.date or mw.text.trim(frame.args[1] or "") if date == "" then date = "No date" end local d, y...
Click to read more »Module:IA Citation/sandbox
Selasa, 2026-03-03 07:02:01>-------------------------------------------- Trims whitespace and returns nil if the resulting string is empty. ]] local function trimArg(arg) if arg == "" or arg...
Click to read more »Module:Text/doc
Jumat, 2025-04-25 22:36:11there is a quote at the start or end of the (trimmed) string. 1 Input text (will be automatically trimmed); may be empty. 2 (optional) the ISO 639 language...
Click to read more »Module:Sandbox/BrownHairedGirl/testparams
Sabtu, 2018-11-24 19:08:05 v = [" .. v .."]\n" if (v ~= nil) then local thisArg = mw.text.trim(v) thisArg = mw.ustring.gsub(thisArg, "^[Cc]ategory:%s*", "", 1) if...
Click to read more »Module:MGT
Minggu, 2026-02-01 18:35:08------------------------------ local function trim(v) if not v then return nil end return mw.text.trim(v) end local function formatHeight(m) m = tonumber(m)...
Click to read more »Module:Sandbox/PHansen/URLutil
Selasa, 2015-01-13 23:49:19r = mw.text.trim( s:sub( i ) ):sub( 2 ) if type( decode ) == "string" then local encoding = mw.text.trim( decode ) ...
Click to read more »Module:Sandbox/Gonnym/Script basic documentation
Kamis, 2024-06-06 19:34:28font in fonts:gmatch("([^,]+)") do font = font:match("^%s*(.-)%s*$") -- Trim leading and trailing whitespace font = font:gsub('"', "") -- Remove double...
Click to read more »Module:Navbar
Rabu, 2023-10-11 05:34:57displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title...
Click to read more »Module:RADec
Rabu, 2026-01-07 11:38:04di tipo number. function p.parseRA(text) local h, m, s text = mw.text.trim(mw.text.unstrip(text)):gsub('−', '-'):gsub(',', '.') h, m, s =...
Click to read more »Module:Shogi diagram/sandbox
Jumat, 2022-07-29 18:19:59makeTD() function function processString(ss) -- strip whitespace ss = mw.text.trim(ss) -- get the last character of the string local lastchar = mw.ustring...
Click to read more »Module:Sandbox/tricoteuses/sometest
Senin, 2020-03-16 04:59:50args = {} for k,v in pairs(frame:getParent().args) do args[k] = mw.text.trim(v) end local end_time = wd._property({ args[1], "P582"}) local start_time...
Click to read more »Module:Random portal component
Sabtu, 2020-10-03 17:08:46function (frame) local args = require('Module:Arguments').getArgs(frame, { trim = false, removeBlanks = false, wrappers = { 'Template:Random portal...
Click to read more »Module:Sandbox/Matt Fitzpatrick/Portal bar
Senin, 2022-10-24 04:03:21mw.text.trim( v ) end args[ k ] = v end end table.sort( portals ) for i, v in ipairs( portals ) do portals[ i ] = mw.text.trim( origArgs[...
Click to read more »Module:JSON arguments
Minggu, 2021-10-24 05:09:48getArgs local p = {} function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(frame, args) end ...
Click to read more »Module:Sandbox/paddyjoy
Rabu, 2022-07-13 20:21:00text.trim(tmp[#tmp])) result['linfo3+2'] = mw.text.trim(tmp[#tmp - 1]) if #tmp > 2 then tmp[#tmp - 2] = mw.text.trim(tmp[#tmp - 2]) ...
Click to read more »Module:Television infoboxes disambiguation check/sandbox
Selasa, 2025-12-30 10:41:40disambiguation:match(p.pattern) isAdjectiveValid = validateCountryAdjective(mw.text.trim(adjective)) isSeasonNumberValid = validateSeasonNumber(seasonNumber)...
Click to read more »Module:Transclude TOC
Sabtu, 2022-10-22 16:17:38l:gsub() removes the link and pipe (if they exist); the second :gsub() trims white space from the label if str was wrapped in wikilink markup. Presumably...
Click to read more »Module:Sandbox/trappist the monk/dab check
Selasa, 2019-05-21 23:14:09return 'error: no type specifier'; end dab_no_specifier = mw.text.trim (dab_no_specifier); -- remove trailing white space if there is any...
Click to read more »Module:Labelled list hatnote
Kamis, 2025-05-29 01:18:35allow smooth removals local v = pages[k] if mw.ustring.sub(mw.text.trim(v), 1, 1) ~= "#" then local title = mw.title.new(getTarget(v), namespace)...
Click to read more »Module:Hodge diamond
Jumat, 2019-06-07 08:21:52if type( k ) == 'number' then entries[ k ] = mw.text.trim(v) argcount = argcount + 1 end end local side...
Click to read more »Module:Random
Rabu, 2015-11-11 23:32:54-- Trim whitespace and remove blank arguments. local args = {} for k, v in pairs(origArgs) do if type(v) == 'string' then v = mw.text.trim(v)...
Click to read more »Module:Import table
Kamis, 2023-05-18 03:58:50+%/%>","") -- remove any references with <ref .. /> tidy = mw.text.trim(tidy) -- trim spaces return tidy end function p.import(frame) local tab = "|"...
Click to read more »Module:Excerpt/sandbox
Jumat, 2026-03-06 19:54:40excerpt local section = Excerpt.getArg( 2, fragment ) section = mw.text.trim( section ) if section == '' then section = nil end if section then excerpt...
Click to read more »Module:Excerpt/portals/sandbox
Jumat, 2026-02-06 20:41:50= fixRefs(text, page, full) end -- Trim trailing newlines to avoid appending text weirdly text = mw.text.trim(text) -- Add (Full article...) link...
Click to read more »Module:LDSverse
Selasa, 2020-09-08 17:14:55displayTextParam = trimSpaces(args[1]) local bookParam = removePeriods(trimSpaces(args[2])) -- take out periods and spaces local chapterParam = trimSpaces(args[3])...
Click to read more »Module:TaxonItalics/sandbox
Rabu, 2025-05-21 17:40:51p.italicizeTaxonName(name, linked, abbreviated, dab) name = mw.text.trim(name) -- if the name begins with '[', then assume formatting is present...
Click to read more »Module:String2/doc
Kamis, 2026-02-05 22:33:45or blank input parameter, rather than throwing an error. The trim function simply trims whitespace characters from the start and end of the string. The...
Click to read more »Module:Sports rivalry series table
Jumat, 2026-01-02 23:39:01'' local team1name = mw.text.trim(args['team1'] or '') local team1abbr = isnotempty(args['team1abbr']) and mw.text.trim(args['team1abbr'] or '') or team1name...
Click to read more »Module:Road data
Selasa, 2023-05-30 18:19:55local insert = table.insert local format = mw.ustring.format local trim = mw.text.trim local parserModule = require(parserModuleName) local parser = parserModule...
Click to read more »Module:Jctint
Kamis, 2024-09-19 07:57:41ustring.format -- Local version of string trimming function local trim = mw.text.trim -- Store this function in a local variable to avoid expensive table...
Click to read more »Module:Sandbox/pppery/massrm
Senin, 2025-12-22 10:02:53return require("Module:Requested move").main(frame); end p = mw.text.trim(mw.ustring.gsub(p,"_"," ")) local new = p:gsub("%([A-Z]",function(x) return...
Click to read more »Module:Soraban
Senin, 2026-06-01 04:04:03function trim(s) return mw.text.trim(s or "") end local function split_csv(s) local t = {} for item in mw.text.gsplit(s or "", ",") do item = trim(item)...
Click to read more »Module:Sandbox/RexxS/Getlabel
Selasa, 2018-02-27 19:37:49given Qid. p = {} p.getLabel = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then itemID = nil...
Click to read more »Module:Sandbox/Ahecht/r
Selasa, 2025-10-07 22:28:43hyphen_to_dash local lang = require('Module:Lang') local trim_quotes = require('Module:trim quotes')._trim local getArgs = require('Module:Arguments').getArgs...
Click to read more »Module:Alhatorah
Jumat, 2022-09-30 02:06:16['obadiah'] = true, } local function trimArg(text) if type(text) == 'string' then text = text:match('(%S.-)%s*$') --trimmed text or nil if empty end return...
Click to read more »Module:Reply to/testcases
Jumat, 2026-02-13 20:21:58class="template-ping">' .. expected .. '</span>' self:assertEquals(mw.text.trim(expected), mw.text.trim(actual), nil, 1) end --------------------------------------...
Click to read more »Module:Lang-zh
Senin, 2025-12-22 17:26:41bold/italic markup) for term in val:gmatch("[^;,]+") do term = mw.text.trim(term, "%s\"") terms = terms .. "'" .. term .. "', " end...
Click to read more »Module:WikidataIdentifiers
Selasa, 2022-07-05 00:59:54p.getIdentifierQualifier = function(frame) local propertyID = mw.text.trim(frame.args[1] or "") -- The PropertyID of the qualifier -- whose value...
Click to read more »Module:Multi-section link/sandbox
Senin, 2024-12-09 18:00:44valueFunc = function (key, value) value = value:match('^%s*(.-)%s*$') -- Trim whitespace -- Allow blank first parameters, as the wikitext template does...
Click to read more »Module:Factorization/sandbox
Kamis, 2026-02-26 01:39:51big = frame.args['big'] and true local serif = frame.args['serif'] and true return mw.text.trim(format(result, bold, big, serif)) end return p...
Click to read more »Module:Labelled list hatnote/sandbox
Kamis, 2025-05-29 01:10:23allow smooth removals local v = pages[k] if mw.ustring.sub(mw.text.trim(v), 1, 1) ~= "#" then local title = mw.title.new(getTarget(v), namespace)...
Click to read more »Module:Category series navigation/sandbox
Kamis, 2025-12-04 03:48:08displaytext, displayend, listoverride ) cat = mw.text.trim(cat or '') displaytext = mw.text.trim(displaytext or '') displayend = displayend or false...
Click to read more »Module:Su/sandbox2
Minggu, 2024-07-14 08:20:17-- We don't need to trim whitespace from any arguments, as this module only -- uses named arguments, and whitespace is trimmed from them automatically...
Click to read more »Module:Sandbox/genewiki/testdislua
Selasa, 2025-07-15 12:00:39handling framework --did we get it from the page local root_qid = mw.text.trim(frame.args['QID'] or "") --try to get it from the args local mm_qid = ""...
Click to read more »Module:Pgn
Jumat, 2018-08-03 07:57:17item:match('([^"]+)"([^"]*)"') if key and val then res[mw.text.trim(key)] = mw.text.trim(val) -- add mw.text.trim() else error('strange item detected: ' .. item...
Click to read more »Module:Sports rivalry series table/sandbox
Jumat, 2026-01-02 23:59:17'' local team1name = mw.text.trim(args['team1'] or '') local team1abbr = isnotempty(args['team1abbr']) and mw.text.trim(args['team1abbr'] or '') or team1name...
Click to read more »Module:Sandbox/Ahecht/doc
Rabu, 2018-06-20 04:20:20Sandbox/Ahecht/sandbox2 Sandbox/Ahecht/sandbox2/doc Sandbox/Ahecht/test Sandbox/Ahecht/test2 Sandbox/Ahecht/trim date Sandbox/Ahecht/url-access Sandbox/Ahecht/wikibase...
Click to read more »Module:Football box collapsible
Kamis, 2024-08-08 20:52:25frame:getParent().args local id = trim(args['id']) local bars = (args['nobars'] == nil) or (args['bars'] == '') local class = trim(args['class'] or 'mw-collapsible...
Click to read more »Module:Phabricator/sandbox
Selasa, 2026-03-17 20:40:51local output = {} for k, v in ipairs(rows) do local taskId = mw.text.trim(args[k]) taskId = ((tonumber(taskId) ~= nil) and "T" or "") .. taskId ...
Click to read more »Module:Sandbox/Nardog/8
Sabtu, 2019-01-26 23:42:26find local gsub = mw.ustring.gsub local sub = mw.ustring.sub local trim = mw.text.trim local function reverseLook(t, s) local ret for i = 1, #s - 1 do...
Click to read more »Module:SST/hosts
Sabtu, 2026-04-18 10:30:10local trimmed = mw.text.trim(segment) if trimmed ~= "" then local display, machine, search = parse_segment(trimmed) ...
Click to read more »Module:PUV stop
Senin, 2025-10-13 18:13:39for k, _ in pairs(data) do service_keys[k] = true end local function trim(s) return (s:gsub("^%s+", ""):gsub("%s+$", "")) end function p.routebox(frame)...
Click to read more »Module:Infobox election/sandbox
Selasa, 2026-01-06 21:09:47_fetch -- Helper functions -- local notblank = function (v) return (mw.text.trim(v or "") ~= "") end local ifblank = function (v, alt1, alt2) return notblank(v)...
Click to read more »Module:IA Citation
Rabu, 2026-03-04 11:04:27>-------------------------------------------- Trims whitespace and returns nil if the resulting string is empty. ]] local function trimArg(arg) if arg == "" or arg...
Click to read more »Module:Infobox election
Jumat, 2026-01-16 23:00:21_fetch -- Helper functions -- local notblank = function (v) return (mw.text.trim(v or "") ~= "") end local ifblank = function (v, alt1, alt2) return notblank(v)...
Click to read more »Module:Article link count
Kamis, 2026-05-21 15:57:11linkText in text:gmatch("%[%[([^%[%]|]+)") do linkText = mw.text.trim(linkText) if linkText ~= "" and not uniqueLinks[linkText]...
Click to read more »Module:Sandbox/trappist the monk/wikisource param fetch
Selasa, 2022-12-27 03:03:33get the next parameter name from template param = mw.text.trim (param); -- trim wihtespace if any if param:find ('%d') then --...
Click to read more »Module:Sandbox/Mathglot/Xreadership
Sabtu, 2026-01-03 03:57:55.. mw.text.encode(mw.text.trim(rargs.days)) .. '&pages=' .. mw.text.encode(mw.text.trim(ifblank(rargs.pv, tostring(mw.title.getCurrentTitle()...
Click to read more »Module:URL/sandbox-samecase
Kamis, 2019-02-21 05:35:44end end function p._url(url, text, msg) url = mw.text.trim(url or '') text = mw.text.trim(text or '') local nomsg = msg:sub(1,1):lower() == "n" or...
Click to read more »Module:Political party/sandbox
Sabtu, 2026-02-21 21:25:57end local function stripToNil(text) -- If text is a string, return its trimmed content, or nil if empty. -- Otherwise return text (which may, for example...
Click to read more »Module:Sandbox/genewiki/alllua
Selasa, 2017-04-18 12:53:47handling framework --did we get it from the page local root_qid = mw.text.trim(frame.args['QID'] or "") --try to get it from the args local mm_qid = ""...
Click to read more »Module:Sandbox/jfhutson/bibleverse
Senin, 2017-01-16 04:20:13cc', } } local function trimArg(arg) if arg == '' or arg == ' ' or arg == nil then return nil else return mw.text.trim(arg) end end local function...
Click to read more »Module:TaxonList
Selasa, 2025-06-10 10:51:53pairs(taxonArgs) do if tonumber(param) then if first then taxonName = mw.text.trim(value) -- if necessary separate any initial modifier taxonName, dagger...
Click to read more »Module:Math/sandbox
Jumat, 2026-04-10 00:08:08it. number_string = number_string:match("^%+(.*)$") or number_string -- Trim any leading + signs. if number_string:find('^%-?0[xX]') then -- Number...
Click to read more »Module:Jctrdt/sandbox
Jumat, 2024-08-23 11:08:52local insert = table.insert local format = mw.ustring.format local trim = mw.text.trim local parserModule = require(parserModuleName) local parser = parserModule...
Click to read more »Module:ConvertNumeric
Kamis, 2023-02-09 08:04:17end num = num:sub(1 + group_digits) num = num:gsub("^0*", "") -- Trim leading zeros end -- Handle final three digits of integer part if s ~=...
Click to read more »Module:Phabricator
Sabtu, 2026-02-28 23:35:26"[[Phabricator:|Phabricator]]" end for k, v in ipairs(output) do args[v] = mw.text.trim(args[v]) local taskId = ((tonumber(args[v]) ~= nil) and "T" or "") .. args[v]...
Click to read more »Module:WikiProjects for deletion
Sabtu, 2024-11-02 21:47:17output for t in string.gmatch(content, "{{(.-)}}") do temp = mw.text.trim(t) -- store content between {{}} in temp if string.find(temp...
Click to read more »Module:Navbar/sandbox
Rabu, 2025-08-13 12:10:29displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title...
Click to read more »Module:Sandbox/StefenTower/Article link count test
Sabtu, 2026-05-23 07:25:30linkText in text:gmatch("%[%[([^%[%]|]+)") do linkText = mw.text.trim(linkText) if linkText ~= "" and not uniqueLinks[linkText]...
Click to read more »Module:Sandbox/逆襲的天邪鬼/vandalism
Senin, 2017-02-06 10:02:50-- 將「坐等刪除」換成已被刪光 if (not frame.args['notaunt']) or (mw.text.trim(frame.args['notaunt']) == '') then local x, y = string.find(output...
Click to read more »Module:Arbcom election banner
Selasa, 2025-10-21 04:33:53-- Trim whitespace and remove blank arguments. local args = {} for k, v in pairs(origArgs) do if type(v) == 'string' then v = mw.text.trim(v) ...
Click to read more »Module:Location map
Selasa, 2026-05-26 13:47:54use this function p.valueFunc(key, value) if value then value = mw.text.trim(value) end if value ~= '' or key == 'caption' or key == 'maplink' then...
Click to read more »Module:Sandbox/Frietjes
Kamis, 2026-04-16 23:33:07*;%s*([Cc][Oo][Ll][Oo][Rr]%s*:%s*.-)%s*;') return color or 'NO MATCH' end local function trim(s) return s:match('^%s*(.-)%s*$') end function p.timeline(frame) local...
Click to read more »Module:User:Colchester Overpass/RarityText
Minggu, 2025-12-28 01:23:33function normalize(s) if not s then return "common" end return mw.text.trim(mw.ustring.lower(s)) end local function ucfirst(s) s = s or "" return...
Click to read more »Module:Domain handler
Jumat, 2025-04-11 00:10:56"domains" if domain and domain ~= "" then domain = mw.text.trim(domain):lower() domain = "." .. domain:gsub("^%.", "") local...
Click to read more »Module:Hatnote/sandbox
Kamis, 2022-08-11 23:24:18getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') ...
Click to read more »Module:Jctint/sandbox
Minggu, 2025-12-14 20:28:01ustring.format -- Local version of string trimming function local trim = mw.text.trim -- Store this function in a local variable to avoid expensive table...
Click to read more »Module:Random/sandbox
Selasa, 2023-04-04 01:40:10-- Trim whitespace and remove blank arguments. local args = {} for k, v in pairs(origArgs) do if type(v) == 'string' then v = mw.text.trim(v)...
Click to read more »Module:Sports results/Chess
Selasa, 2024-10-15 13:23:03gsub(bg_col,'^%s*','') -- Trim starting whitespace bg_col = mw.ustring.gsub(bg_col,'%s*$','') -- Trim ending whitespace if bg_col...
Click to read more »Module:Format TemplateData/sandbox
Jumat, 2025-11-14 09:11:27= elements end elseif s == "string" then s = mw.text.trim( about ) if s ~= "" then r1 = { } table.insert(...
Click to read more »Module:If not given or empty
Kamis, 2024-07-04 01:00:26t_args = frame:getParent().args local check_param = m_args[1] and mw.text.trim(m_args[1]) or '' if (check_param ~= '') then local s, c if...
Click to read more »Module:Domain handler/sandbox
Kamis, 2025-04-10 22:36:14"domains" if domain and domain ~= "" then domain = mw.text.trim(domain):lower() domain = "." .. domain:gsub("^%.", "") local...
Click to read more »Module:Sandbox/Johnuniq/Wiktionary
Minggu, 2020-08-30 16:24:59ipairs(args) do arg = mw.text.trim(arg) if arg ~= '' then if arg:sub(1, 1) == '_' then local special = mw.text.trim(arg:sub(2)) if lastWasSpecial...
Click to read more »Module:Road data/sandbox
Senin, 2024-08-26 15:44:01local insert = table.insert local format = mw.ustring.format local trim = mw.text.trim local parserModule = require("Module:Road data/parser") local parser...
Click to read more »Module:Wd
Rabu, 2025-07-23 02:53:47if eid:sub(1,9):lower() == "property:" then id = replaceAlias(mw.text.trim(eid:sub(10))) if id:sub(1,1):upper() ~= "P" then id = "" end ...
Click to read more »Module:Selected current events/sandbox
Sabtu, 2019-03-09 15:18:28itemIndex + 1 end if more then output = output .. more end return mw.text.trim(output) end function cleanForPatternMatching(wikitext) -- remove wikilink...
Click to read more »Module:Country2nationality
Rabu, 2025-10-29 01:11:35YUGOSLAVIA = "Yugoslavian" } function p.c2n(name, nocat) name = mw.text.trim(name) local country = mw.ustring.gsub(name, "^St. ", "Saint ") country...
Click to read more »Module:Country2nationality/sandbox
Selasa, 2025-08-26 01:29:20YUGOSLAVIA = "Yugoslavian" } function p.c2n(name, nocat) name = mw.text.trim(name) local country = mw.ustring.gsub(name, "^St. ", "Saint ") country...
Click to read more »Module:A or an/sandbox
Sabtu, 2022-05-21 19:23:46text end function p._main(args) local original_text = args[1] and mw.text.trim(args[1]) local text = original_text local article = article.a local ret...
Click to read more »Module:Transclusion count/data/S
Minggu, 2026-05-31 12:15:12["Speciesbox/name"] = 389000, ["Speciesbox/parameterCheck"] = 389000, ["Speciesbox/trim"] = 389000, ["Specieslist"] = 9200, ["Split_article"] = 4200, ["Spnd"] =...
Click to read more »Module:Infobox body of water tracking
Rabu, 2025-05-14 03:11:21water without alt_bathymetry]]' end if args['mapframe'] and mw.text.trim(args['mapframe']) == 'yes' then maincats = maincats .. '[[Category:Articles...
Click to read more »Module:User scripts table/sandbox
Kamis, 2022-06-16 12:27:45before 600 chars .. '<!-- -->' desc = mw.text.trim(desc):gsub('^(.+)%.$', '%1')..'.' --trim and add last period, if missing .. ' [[' .. docTitle...
Click to read more »Module:Redirect template printability
Senin, 2025-08-18 12:09:36function normalize(val) if not val then return nil end val = mw.text.trim(val):lower() if val == 'yes' or val == 'true' or val == '1' then ...
Click to read more »Module:Change/sandbox
Selasa, 2023-04-11 10:46:23'♠"></span>' end local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and trim(s) ~= '' end function change(args)...
Click to read more »Module:Tabular data/sandbox
Kamis, 2021-07-01 15:55:32--local data = args.data or mw.ext.data.get(args[1]) local page = mw.text.trim(args[1]) -- "UN:Total population, both sexes combined.tab"...
Click to read more »Module:Navbox
Rabu, 2026-02-25 00:16:57function concatstyles(s) local r = '' for _, v in ipairs(s) do v = mw.text.trim(v, "%s;") if not isblank(v) then r = r .. v .. ';' end end if isblank(r)...
Click to read more »Module:ArbComMembers
Selasa, 2025-05-20 09:34:27getCount(frame) local arg = frame.args[1] local mode = arg and mw.text.trim(mw.ustring.lower(arg)) local counts = parseCounts(content) if mode...
Click to read more »Module:Conservation status
Sabtu, 2026-04-18 16:22:17local system = mw.text.trim(frame:getParent().args[1]) -- needs trim() for unnamed parameters local status = mw.text.trim(frame:getParent().args[2])...
Click to read more »Module:Interlinear
Jumat, 2024-09-06 16:54:50tidyCss(str) str = mw.ustring.gsub(str, '^[\"\']*(.-)[\"\']*$', "%1") -- trims quotation marks if mw.ustring.sub(str, -1) ~= ";" then str = str .. ";"...
Click to read more »Module:CricketLeagueGroupStageSummary/sandbox
Kamis, 2025-01-16 23:35:13-- Not played yet local errorColour = "#FF7777" -- Error function trim(s) if not s then return nil else return (mw.ustring...
Click to read more »Module:Sports results/Chess/sandbox
Selasa, 2024-10-15 13:26:14gsub(bg_col,'^%s*','') -- Trim starting whitespace bg_col = mw.ustring.gsub(bg_col,'%s*$','') -- Trim ending whitespace if bg_col...
Click to read more »Module:Import table/sandbox
Senin, 2023-05-22 17:25:13gsub(tidy,"^%s*%|","") -- remove | character at start tidy = mw.text.trim(tidy) -- trim spaces return tidy end function p.import(frame) local tab = "|"...
Click to read more »Module:Sandbox/Desb42/Transcluder
Minggu, 2021-11-28 21:23:233-5' to {'1','3-5'} for _, range in pairs(ranges) do range = mw.text.trim(range) local min, max = string.match(range, '^(%d+)%s*%-%s*(%d+)$') --...
Click to read more »Module:Citation/CS1/Utilities
Minggu, 2026-01-18 02:25:10from [[D]] or [[D|]] wl_type = 1; end D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters return wl_type, D, L or...
Click to read more »Module:Mapframe/sandbox
Selasa, 2026-02-10 19:36:31end --[[ Trim whitespace from args, and remove empty args. Also fix control characters. @param {table} argsTable @returns {table} trimmed args table...
Click to read more »Module:Arbcom election banner/sandbox
Rabu, 2025-07-30 13:55:11-- Trim whitespace and remove blank arguments. local args = {} for k, v in pairs(origArgs) do if type(v) == 'string' then v = mw.text.trim(v) ...
Click to read more »Module:Wikt-lang
Minggu, 2025-06-22 00:01:58args[1] and parent.args or frame.args local codes = args[1] and mw.text.trim(args[1]) local word1 = ifNotEmpty(args[2]) local word2 = ifNotEmpty(args[3])...
Click to read more »Module:Events by year for decade/sandbox
Senin, 2025-03-24 03:57:43and 'na' or 'n'}} local section = '== ' .. year .. '==\n' .. mw.text.trim( frame:expandTemplate{ title ='transcluded section', args = { year2 }}...
Click to read more »Module:Casenav
Minggu, 2020-12-13 23:57:14mw.text.split(str, '=') if #pair==2 then args[mw.text.trim(pair[1])] = mw.text.trim(pair[2]) end end end --set module variables people...
Click to read more »Module:Sandbox/Robot8A
Senin, 2025-11-10 21:21:05= {} for _, initials in ipairs(people) do initials = mw.text.trim(initials) local fullname = args["name_" .. initials] or initials...
Click to read more »Module:Infobox mapframe/sandbox2
Minggu, 2025-11-09 23:09:55local DEFAULT_MARKER_COLOR = "#5E74F3" -- Trim whitespace from args, and remove empty args function trimArgs(argsTable) local cleanArgs = {} for key...
Click to read more »Module:Freeze
Rabu, 2024-02-07 11:50:14args) local curTitle = mw.title.getCurrentTitle() local page = mw.text.trim(args[1] or '') local text = args[2] or '' if page == '' or string.sub(page...
Click to read more »Module:Sandbox/SD0001/Pgn
Senin, 2025-02-03 17:18:41item:match('([^"]+)"([^"]*)"') if key and val then res[mw.text.trim(key)] = mw.text.trim(val) -- add mw.text.trim() else error('strange item detected: ' .. item...
Click to read more »Module:YMD to ISO
Selasa, 2022-11-22 17:54:50first argument is missing end local arg1, _ = string.gsub(mw.text.trim(frame.args[1]),'_',' ') return p._main(arg1) end function p._main(arg1)...
Click to read more »Module:Hatnote group
Sabtu, 2022-11-19 01:00:04hatnotePattern, '%2'), ' ', true ) ) do row.classes[mw.text.trim(w)] = true end table.insert(innerHatnotes, row) end --Identify...
Click to read more »Module:Sandbox/RexxS/GetDateValue
Senin, 2022-10-24 04:15:14propertyID = mw.text.trim(frame.args[1] or "") local input_parm = mw.text.trim(frame.args[2] or "") local date_format = mw.text.trim(frame.args[3] or...
Click to read more »Module:Transclusion count/data/T
Minggu, 2026-05-31 12:15:22["Tree_list/styles.css"] = 24000, ["Trim"] = 2900000, ["Trim_%"] = 6600, ["Trim_brackets"] = 3400, ["Trim_leading"] = 2100, ["Trim_quotes"] = 25000, ["Trout"]...
Click to read more »Module:Sandbox/RexxS/Ranking
Sabtu, 2017-11-18 22:45:15supplied for arbitrary access; make empty string into nil local qid = mw.text.trim(frame.args.qid or "") if qid and (#qid == 0) then qid = nil end local...
Click to read more »Module:Sandbox/Miria~01/sumMedals
Selasa, 2023-09-12 00:16:58unformatted numbers local numPattern = "|%s*([%s']*%d+[%s']*)%s*|" local trimmedRow = "" -- Iterate through the rows of the table for row in...
Click to read more »Module:Sandbox/Biggins/LDSverseWS
Jumat, 2020-08-07 10:41:35displayTextParam = trimSpaces(args[1]) local bookParam = trimSpaces(args[2]) local chapterParam = trimSpaces(args[3]) local verseParam = trimSpaces(args[4])...
Click to read more »Module:Chart
Minggu, 2025-10-05 10:07:07hideGroupLegends local function nulOrWhitespace( s ) return not s or mw.text.trim( s ) == '' end local function createGroupList( tab, legends, cols ) if...
Click to read more »Module:Sandbox/trappist the monk/wrapper doc
Jumat, 2025-11-21 00:40:09= b:match (pattern); a = mw.text.trim (a); -- make sure no extraneous white space b = mw.text.trim (b); return a < b; ...
Click to read more »Module:Infobox/sandbox
Kamis, 2026-06-04 03:40:46infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p...
Click to read more »Module:String
Selasa, 2025-08-12 06:48:56or "" if nomatch == "" then nomatch = nil end -- local text = mw.text.trim(args[1] or args.text or "") if text == "" then return nil end -- local...
Click to read more »Module:User:McBayne/Core
Selasa, 2026-01-06 23:04:12are treated the same way as spaces. * table values - input values are trimmed (whitespace removed from the beginning and the end) and...
Click to read more »Module:Citation/CS1
Sabtu, 2026-02-28 22:14:46trim = true; elseif f.sub(str, -3, -1) == duplicate_char .. '"]' then -- if last three chars of str are sepc"] quoted external link trim =...
Click to read more »Module:PakistanSuperLeagueProgression
Minggu, 2019-11-24 00:52:11= mw.text.split local strFormat = string.format local strTrim = mw.text.trim local strSub = string.sub local strRepeat = string.rep ...
Click to read more »Module:Jct
Kamis, 2022-12-29 10:42:28local insert = table.insert local format = mw.ustring.format local trim = mw.text.trim local parserModule = require(parserModuleName) local parser = parserModule...
Click to read more »Module:Sandbox/Trappist the monk/deprecated sources
Kamis, 2024-01-04 06:36:09*|([^}]+)') do -- <raw_domains> from deprecated uses raw_domains = mw.text.trim (raw_domains); -- get rid of leading/trailing whitespace local domains_t...
Click to read more »Module:Adjacent stations/convert
Kamis, 2019-03-07 11:36:30ustring.gsub(code[i], '\n', ' ') local template = mw.ustring.lower(mw.text.trim(mw.ustring.match(code[i], '^[^|]+'))) code[i] = mw.ustring.match(code[i]...
Click to read more »Module:OpinionPollDenmark
Kamis, 2025-10-23 18:13:20parseLink(text) if not text then return text end text = mw.text.trim(text) -- Eksternt link som [https://dr.dk Epinion] eller [Epinion dr...
Click to read more »Module:Infobox
Sabtu, 2025-12-13 06:40:10infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p...
Click to read more »Module:TemplatePar/sandbox
Senin, 2023-04-03 05:36:37answer permitted -- Uses: -- > Patterns -- failure() -- mw.text.trim() -- facility() -- failsafe() -- containsCJK() local r = false local...
Click to read more »Module:Infobox weather event/scalebar
Jumat, 2025-10-03 21:52:21categories') local p = {} function p.main(frame) local args = getArgs(frame, { trim = true }) return p._main(frame, args) end function p._main(frame,...
Click to read more »Module:Iso2nationality
Minggu, 2025-06-15 15:09:50i2n(code) if data[mw.ustring.upper( mw.text.trim(code) )] then return data[mw.ustring.upper( mw.text.trim(code) )] end return code end p[''] = function...
Click to read more »Module:Sandbox/genewiki/infobox gene dev
Jumat, 2017-05-26 04:56:08handling framework --did we get it from the page local root_qid = mw.text.trim(frame.args['QID'] or "") --try to get it from the args local mm_qid = ""...
Click to read more »Module:Parsedate
Kamis, 2013-08-29 04:24:06after 31 A.D. p.parse_date = function(frame) local strdate = mw.text.trim(frame.args[1] or "") local invalid = false local wrd = {} local num...
Click to read more »Module:Japanese calendar
Sabtu, 2023-09-30 10:29:55end else origArgs = frame end -- Trim whitespace and remove blank arguments. local args = {} for...
Click to read more »Module:TaxonList/sandbox
Rabu, 2025-05-21 17:51:11pairs(taxonArgs) do if tonumber(param) then if first then taxonName = mw.text.trim(value) -- if necessary separate any initial modifier taxonName, dagger...
Click to read more »Module:JCW
Jumat, 2022-10-21 17:51:19function stripToNil(text) -- If text is a non-empty string, return its trimmed content. -- Otherwise, return nothing (text is an empty string or is not...
Click to read more »Module:Location map/sandbox
Selasa, 2026-06-02 04:25:47use this function p.valueFunc(key, value) if value then value = mw.text.trim(value) end if value ~= '' or key == 'caption' or key == 'maplink' then...
Click to read more »Module:Sandbox/Cyborg Coder/Dates
Kamis, 2018-12-06 10:31:19"Valid" end function p.date(frame) local date = frame.args.text or mw.text.trim(frame.args[1] or "") date = " " .. date local dformat = frame.args.format...
Click to read more »Module:IsAdmin
Sabtu, 2025-05-24 05:50:58local function normalise(name) if not name then return '' end -- Trim whitespace, convert underscores to spaces, capitalise first letter name...
Click to read more »Module:Sandbox/Was a bee/uses
Minggu, 2018-05-13 09:12:24local result = '' local ii = 1 while true do local p_num = mw.text.trim(parent.args[ii] or '') if p_num ~= '' then local label = mw.wikibase...
Click to read more »Module:Jcttop/core
Kamis, 2022-09-22 06:43:34exits %s unnumbered.", tense and 'were' or 'are')) end return mw.text.trim(table.concat(text)) end local function header(args) local row = mw.html...
Click to read more »Module:Probox/sandbox
Senin, 2016-11-21 03:06:08pairs(filled_role_data) do local field = data.fields[role] field.title = mw.text.trim(frame:expandTemplate{title=args.translations, args={field.key}}) field...
Click to read more »Module:Lang-zh/sandbox
Kamis, 2025-09-11 20:39:36bold/italic markup) for term in val:gmatch("[^;,]+") do term = mw.text.trim(term, "%s\"") terms = terms .. "'" .. term .. "', " end...
Click to read more »Module:Sandbox/Matthiaspaul/Citation/CS1/Utilities
Selasa, 2020-06-16 10:15:41wl_type = 1; end D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters -- L = L and mw.text.trim (L, '%s|'); return wl_type...
Click to read more »Module:Lockbox
Minggu, 2024-11-10 13:48:34the output list. for i, item in ipairs(frame.args) do item = mw.text.trim(item) local title = mw.title.new(item) if title then local ns = title...
Click to read more »Module:Mapframe/sandbox/testcases
Rabu, 2020-03-25 12:18:01(no same-named arg with or without any suffix)") end function suite:testTrimArgs() -- @param {Table<String, String|Number>}argsTable -- @returns {Table<String...
Click to read more »Module:Good Articles
Minggu, 2025-04-13 01:35:50'<small>(0 articles)</small>' else local linkList, count = mw.ustring.gsub(mw.text.trim(frame.args[1] or frame:getParent().args[1]), '\n', ' –\n') return...
Click to read more »Module:ConvertNumeric/sandbox
Jumat, 2026-02-13 20:42:25end num = num:sub(1 + group_digits) num = num:gsub("^0*", "") -- Trim leading zeros end -- Handle final three digits of integer part if s ~=...
Click to read more »Module:Excerpt slideshow/sandbox
Minggu, 2024-08-18 18:09:47local processBraces = function(t) local isTable = mw.ustring.sub(mw.text.trim(t), 2, 2) == '|' if isTable then return '' end -- else it's a template...
Click to read more »Module:Delink
Sabtu, 2024-02-17 11:47:33match(s, "^%s*(%S.*)$") or "" -- If the separating character was a space, trim it off. local s_decoded = mw.text.decode(s, true) if mw.ustring.match(s_decoded...
Click to read more »Module:Sandbox/pppery/list markup
Jumat, 2020-03-27 21:25:41nil then -- not an indented comment if #lastindent ~= 0 and #mw.text.trim(line) == 0 then -- buffer blank lines or lines containing whitespace...
Click to read more »Module:Interlinear/sandbox2/gcl
Jumat, 2024-02-02 11:37:35Sundry small functions --------------------- local function tidyCss(str) -- trims quotation marks str = mw.ustring.gsub(str, '^["\']*(.-)["\']*$', "%1")...
Click to read more »Module:Jctrdt
Selasa, 2023-08-08 01:00:11local insert = table.insert local format = mw.ustring.format local trim = mw.text.trim local parserModule = require(parserModuleName) local parser = parserModule...
Click to read more »Module:Catalog lookup link
Jumat, 2025-09-12 01:09:00Optional unnamed parameters for 0 to 9 items to be listed. Whitespace is trimmed off both ends and the strings are urlencoded as if they were query strings...
Click to read more »