lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It would have been nice if strfind was defined as returning (start, end+1)
instead of (start, end).  I'm always having to add the +1 in my code anyway.
Using (x, x-1) to mean zero-length is questionable in my opinion.

thanks,
-John


Reuben Thomas wrote:
> The return value "1,0" indicates that the string found starts at position
> one, and is of length zero (a return of 1,1 would indicate that "h" had
been
> matched).