Module:Text: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
m
no edit summary
de>Mps
mNo edit summary
de>Mps
mNo edit summary
Line 336:
-- removes all diacritics from the input string, by decomposing the characters, removing the combining diacritical marks and recomposing the remaining characters
function p.removeDiacritics(frame)
local combiningDiacriticalMarks = "[" .. mw.ustring.char(0x0300) .. "-" .. mw.ustring.char(0x036F) .. mw.ustring.char(0x1AB0) .. "-" .. mw.ustring.char(0x1AFF) .. mw.ustring.char(0x1DC0) .. "-" .. mw.ustring.char(0x1DFF) .. "]"
return mw.ustring.toNFC(mw.ustring.gsub(mw.ustring.toNFD(frame.args[1] or ""), combiningDiacriticalMarks, ""))
end
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu