string.gsub用法:
函数原型:string.gsub( s, pattern, rep1[, n] )
函数功能:返回一个和pattern匹配,并且用rep1替换的副本。rep1可以是string、table和functin。
第二个返回值n是代表匹配的个数。
string.gsub用法:
函数原型:string.gsub( s, pattern, rep1[, n] )
函数功能:返回一个和pattern匹配,并且用rep1替换的副本。rep1可以是string、table和functin。
第二个返回值n是代表匹配的个数。
本文标题:Lua练习12-字符替换string.gsub
本文链接:https://www.haomeiwen.com/subject/bokbyktx.html
网友评论