Module:rue-sortkey

Hello, you have come here looking for the meaning of the word Module:rue-sortkey. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:rue-sortkey, but we will also tell you about its etymology, its characteristics and you will know how to say Module:rue-sortkey in singular and plural. Everything you need to know about the word Module:rue-sortkey you have here. The definition of the word Module:rue-sortkey will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:rue-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, b, c = u(0xF000), u(0xF001), u(0xF002)

local oneChar = {
	 = "г" .. a,  = "е" .. a,  = "е" .. b,  = "и",  = "и" .. a,  = "и" .. c,  = "щ" .. a,  = "я" .. a,  = "я" .. b
}

function export.makeSortKey(text, lang, sc)
	text = mw.ustring.gsub(mw.ustring.lower(text), "и", "и" .. b) -- ensure "и" comes after "і" and "ї"
	
	return mw.ustring.upper(mw.ustring.gsub(text, ".", oneChar))
end

return export