มอดูล:Talu-sortkey
หน้าตา
- The following documentation is located at มอดูล:Talu-sortkey/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
มอดูลนี้จำเป็นสำหรับมอดูลภาษาที่ใช้ร่วมกัน คือ มอดูล:khb-sortkey ซึ่งใช้ใน มอดูล:collation
local export = {}
local u = mw.ustring.char
local monographs = {
["[%p]"] = "", ["᧞"] = "ᦶᦜ", ["᧟"] = "ᦶᦜᧁ", ["᧚"] = "᧑"
}
function export.makeSortKey(text, lang, sc)
for from, to in pairs(monographs) do
text = mw.ustring.gsub(text, from, to)
end
text = mw.ustring.gsub(text, "([ᦵᦶᦷᦺ])([ᦀ-ᦫ])", "%2%1")
return text
end
return export