Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在字符串中添加逗号来分隔文本
假设我有这个字符串:
local s = "some text here"
我想将该字符串(没有空格)转换为:
local t = "some,text,here"
任何帮助将不胜感激..
您可以使用 gsub()
t = string.gsub(s, " ", ",")