lua string.find函数使用说明求教:a1,b1,c1=string.find(a,b,c),这个a1,b1,c1,a,b,c分别表示什么
1个回答
展开全部
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.
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.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询