Module:Str find word: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 1:
--- STABLE: 16-11-2021 20:30
-- todo: sep = len 1 max?
-- ? not %escape then?
--- test {{!}}
 
require('Module:No globals')
Line 15 ⟶ 14:
local report -- to be initinated when explain needed
 
-- Initialise the /report subpage.
-- only invoked when needed when 'explain' asked
local function initReport()
report = require('Module:Str find word/report')
end
 
-- Turn "A" into "A" etc. asap
-- and reduce multi-spaces (including nbsp etc.) into single space
local function decodeUnicode(str)
Line 37 ⟶ 36:
-- step 1: when case-insensitive, turn string into lowercase
-- step 2: read & remove Literals ("..")
-- step 3: readsread comma-separated words
-- step 4: when booleans=T, change boolean words into true/false (module:yesno rules)
-- all words returned are trimmed, TODO and all ws into single-plainspace?
-- only T/F words are edited, other words rtemainremain, untouched
-- return the table (a straight array)
local function buildWordTable(tArgs, sWordlist)