lua-users home
lua-l archive

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


On Tue, 18 Dec 2001, rrthomasrr wrote:

> I just noticed that contrary to what you might expect, if you
> pass "nil" as the fourth argument of strfind, it does a plain match.
> Looking at the source, str_find indeed simply looks to see whether it
> has a fourth argument.
>
> This is rather annoying, as in some other cases where it's nice to be
> able to pass "nil" instead of omitting the argument. It would not be
> contrary to the 4.0 manual to change this behaviour (the manual says
> that if you pass 1 as the fourth arg you get a plain match).
>
> Could this be done?

Sure. We will change that for a test of trueness. That is, if you pass
a "true" value as the fourth arg you will get a plain match.

-- Roberto