首页 > 其他 > 详细

Lua之string.find()

时间:2014-12-17 20:47:37      阅读:197      评论:0      收藏:0      [点我收藏+]

Lua之string.find()

local ss = "1,0"
_,_,p1,p2 = string.find(ss, "(%d+),(%d+)")
_,_,_,_,p3=string.find(ss, "(%d+),(%d+),(%d+)")
print(p1) --1
print(p2) --0
print(p3) --nil
_,_,p4,p5,p6=string.find(ss, "(%d+),(%d+),(%d+)")
print(p4) --nil
print(p5) --nil 
print(p6) --nil

Lua之string.find()

原文:http://www.cnblogs.com/gougouaibiancheng/p/4170234.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!