摘要: 【lua的匹配模式可以看做是功能不完整的正则表达式,只实现了大部分】 使用过程中,遇到的不支持的功能: # 分组匹配多次, 比如: abcabc, 无法用(abc)+匹配到 # 匹配次数范围, 比如: a{1,3}这种, 最少匹配1次,最多匹配3次 【可以使用匹配模式的函数】 # string.fi 阅读全文
posted @ 2021-11-13 23:20 yanghui01 阅读(923) 评论(0) 推荐(0) 编辑
摘要: 1 --常见字符串功能 2 local function Test1() 3 --大小写 4 assert("AA" == string.upper("aa")) 5 assert("aa" == string.lower("AA")) 6 7 --字符串长度 8 assert(2 == strin 阅读全文
posted @ 2021-11-13 21:06 yanghui01 阅读(92) 评论(0) 推荐(0) 编辑