Module:tzl-sortkey

Hello, you have come here looking for the meaning of the word Module:tzl-sortkey. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:tzl-sortkey, but we will also tell you about its etymology, its characteristics and you will know how to say Module:tzl-sortkey in singular and plural. Everything you need to know about the word Module:tzl-sortkey you have here. The definition of the word Module:tzl-sortkey will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:tzl-sortkey, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

local export = {}
local u = mw.ustring.char
local a = u(0xF000)

local remove_diacritics = u(0x0300) .. "-" .. u(0x0303) .. u(0x0308) .. u(0x030A) .. u(0x0327) -- grave, acute, circumflex, tilde, diaeresis, ring above, cedilla

local oneChar = {
	 = "d" .. a,  = "ss",  = "z" .. a
}

function export.makeSortKey(text, lang, sc)
	return mw.ustring.upper(mw.ustring.toNFC(mw.ustring.gsub(mw.ustring.toNFD(mw.ustring.gsub(mw.ustring.lower(text), ".", oneChar)), "", "")))
end

return export