永发信息网

lua string.find函数使用说明求教:a1,b1,c1=string.find(a,b,c),这个a1,b1,c1,a,b,c分别表示什么

答案:1  悬赏:10  手机版
解决时间 2021-11-23 21:39
  • 提问者网友:寂寞梧桐
  • 2021-11-23 13:33
lua string.find函数使用说明求教:a1,b1,c1=string.find(a,b,c),这个a1,b1,c1,a,b,c分别表示什么
最佳答案
  • 五星知识达人网友:酒者煙囻
  • 2021-11-23 13:58
string.find (s, pattern [, init [,
plain]])
Looks for the first match of pattern in the
string s. If it finds a match, then find returns the
indices of s where this occurrence starts and ends; otherwise, it
returns nil. A third, optional numerical argument init
specifies where to start the search; its default value is 1 and can be negative.
A value of true as a fourth, optional argument plain turns
off the pattern matching facilities, so the function does a plain "find
substring" operation, with no characters in pattern being
considered "magic". Note that if plain is given, then
init must be given as well.
If the pattern has captures, then in a successful match the captured values
are also returned, after the two indices.
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯