function StrSplit(inputstr, sep)
    if sep == nil then
      sep = "%s"
    end
    local t={}
    local i=1
    for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
       t[i] = str
       i = i + 1
    end
    return t
end
local a = "23245023496830,汉字。。。。"
local b = ":"
b = StrSplit(a,",")
print(b[1])

输出

23245023496830

 

相关文章:

  • 2021-10-25
  • 2022-12-23
  • 2021-05-15
  • 2021-12-30
  • 2022-12-23
  • 2021-10-13
  • 2021-05-06
  • 2021-11-20
猜你喜欢
  • 2021-08-15
  • 2022-12-23
  • 2022-01-09
  • 2021-06-11
  • 2021-11-07
  • 2022-02-19
  • 2022-12-23
相关资源
相似解决方案