Module:rad-IPA: Difference between revisions

Jump to navigation Jump to search
m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
(Test)
 
mNo edit summary
Line 121: Line 121:


function export.generate_IPA(s)
function export.generate_IPA(s)
local s_len = utf8.len(s)
local s_len = mw.umw.ustring.len(s)
IPA = {}
IPA = {}


local split_s = {}
local split_s = {}
for i = 1, s_len do
for i = 1, s_len do
  split_s[i] = string.sub(s, i,i)
  split_s[i] = mw.umw.ustring.sub(s, i,i)
end
end


Line 213: Line 213:
  print("Target acquired of length " .. 1 - i .. ", converting to [" .. getData .. "].")
  print("Target acquired of length " .. 1 - i .. ", converting to [" .. getData .. "].")
  append_IPA(getData)
  append_IPA(getData)
  s = string.sub(s, 1, s_len + i - 1)
  s = mw.ustring.sub(s, 1, s_len + i - 1)
  s_len = string.len(s)
  s_len = mw.ustring.len(s)
  break
  break
elseif deadEnd == false then
elseif deadEnd == false then

Navigation menu