Module:kilta-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 6: Line 6:
local u = mw.ustring.char
local u = mw.ustring.char
local gsplit = mw.text.gsplit
local gsplit = mw.text.gsplit
local split = mw.text.split


local A = u(0x0301) -- COMBINING ACUTE
local A = u(0x0301) -- COMBINING ACUTE
Line 22: Line 23:
foo, bar = match(foo, "^."), match(bar, "^.") -- sort out the letter
foo, bar = match(foo, "^."), match(bar, "^.") -- sort out the letter
return foo == bar and true or false
return foo == bar and true or false
end
local function split (input, sep)
    if sep == nil then sep = "%s" end
   
    local t = {}
    for str in gmatch(input, "([^" .. sep .. "]+)") do
table.insert(t, str)
    end
   
    return t
end
end