「モジュール:文字列」の版間の差分

編集の要約なし
編集の要約なし
編集の要約なし
 
(同じ利用者による、間の1版が非表示)
103行目: 103行目:
end
end


function p.split(frame)
function p.split(sep,trgt)
   if #frame < 1 then return {} end
   if trgt == nil then return {} end
   local t = {}
   local t = {}
   i = 1
   i = 1
   for str in string.gmatch(str, "([^"..frame.args[1].."]+)") do
   for str in string.gmatch(trgt, "[^"..sep.."]+") do
     t[i] = str
     t[i] = str
     i = i + 1
     i = i + 1
3,270

回編集