Lua 常规替换字符串如何替换
s = string.gsub("Lua is good", "good", "bad")
print(s) --> Lua is bad
Lua 常规替换特殊字符
a = "我们使用$";
b = string.gsub(a, "%$", "RMB");
print(b) --> 我们使用RMB
其他替换相关参考
http://blog.csdn.net/weiyuefei/article/details/52044235
时间: 2024-10-27 16:42:25