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

編集の要約なし
編集の要約なし
編集の要約なし
 
(同じ利用者による、間の3版が非表示)
96行目: 96行目:
end
end
elseif frame.args[1] then
elseif frame.args[1] then
s = p.each_utf8(frame.args[1])[1]
s = each_utf8(frame.args[1])[1]
else
else
assert(false,"引数を一つ以上入力してください。")
assert(false,"引数を一つ以上入力してください。")
end
end
return s
return s
end
function p.split(sep,trgt)
  if trgt == nil then return {} end
  local t = {}
  i = 1
  for str in string.gmatch(trgt, "[^"..sep.."]+") do
    t[i] = str
    i = i + 1
  end
  return t
end
end


return p
return p
3,484

回編集