我只是新来lua ...所以我很抱歉如果我失去了一些基本的东西。
我正在运行一个简单的测试,看看我能否在字符串中找到某些值。为什么lua string.find在这个测试用例中返回true?
下面的代码:
print(string.find('[email protected]','.'))
而不是失败,这正是我所期待的,我找回:
mymachinename:/usr/share/std/test# lua test.lua
1 1
你能告诉我,我要去哪里错了吗? 谢谢。
重复? http://stackoverflow.com/questions/15258313/finding-with-string-find – 2013-03-07 20:46:11