मॉड्यूल:typing-aids/data helpers
"इस मॉड्यूल हेतु प्रलेख मॉड्यूल:typing-aids/data helpers/doc पर बनाया जा सकता है"
local export = {}
function export.split_single_and_multi_char(repls)
local processed = {}
local single_char = {}
local multi_char = {}
processed[1] = multi_char
processed[2] = single_char
local decompose, ulen = mw.ustring.toNFD, mw.ustring.len
for pat, repl in pairs(repls) do
pat = decompose(pat)
if ulen(pat) == 1 then
single_char[pat] = repl
else
multi_char[pat] = repl
end
end
return processed
end
return export