string.find issue
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: string.find issue
- From: Shmuel Zeigerman <shmuz@...>
- Date: 2008年4月08日 16:50:18 +0300
Isn't it strange what string.find returns when the initial search
position is beyond the subject end:
print(string.find("a", ".*", 10)) --> 2 1
BTW, when trying to write string.gmatch in pure Lua, using string.find,
one should take this issue into consideration (and do an additional check).
So I propose that string.find return nil in this case.
--
Shmuel