[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: string.find issue
- From: Shmuel Zeigerman <shmuz@...>
- Date: Tue, 08 Apr 2008 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.