Module:yi-utilities

From Wiktionary, the free dictionary
Jump to navigation Jump to search
This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

require('mw.ustring')

heUtils = require('Module:he-utilities')
heLetters = heUtils.letters
heVowels = heUtils.vowels

p = {}

function p.finalToMedial(word)
	word = mw.ustring.gsub(word, heLetters.kafSofit, heLetters.kaf)
	word = mw.ustring.gsub(word, heLetters.memSofit, heLetters.mem)
	word = mw.ustring.gsub(word, heLetters.nunSofit, heLetters.nun)
	word = mw.ustring.gsub(word, heLetters.peiSofit, heLetters.pei .. heVowels.rafe)
	word = mw.ustring.gsub(word, heLetters.tsadiSofit, heLetters.tsadi)
	return word
end

return p