Module:rad-IPA: Difference between revisions

Jump to navigation Jump to search
m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 116: Line 116:
-- BEGIN BASE GENERATION --
-- BEGIN BASE GENERATION --
function export.generate_IPA(s)
function export.generate_IPA(s)
local s_len = mw.ustring.len(s)
local s_len = s:len()
IPA = {}
IPA = {}
local split_s = {}
local split_s = {}
for i = 1, s_len do
for i = 1, s_len do
  split_s[i] = mw.ustring.sub(s, i,i)
  split_s[i] = mw.ustring.gsub(s, i,i)
end
end
if s_len == 0 then
if s_len == 0 then
Line 185: Line 185:
  if type(getData) == "string" and (i == 0 or multiMatch == true) then
  if type(getData) == "string" and (i == 0 or multiMatch == true) then
  append_IPA(getData)
  append_IPA(getData)
  s = mw.ustring.sub(s, 1, s_len + i - 1)
  s = mw.ustring.gsub(s, 1, s_len + i - 1)
  s_len = mw.ustring.len(s)
  s_len = s:len(s)
  break
  break
elseif deadEnd == false then
elseif deadEnd == false then

Navigation menu