Minor old-standing documentation nitpick

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Minor old-standing documentation nitpick

Sergey Zakharchenko
Hello list,

For a long time, "string.find (s, pattern [, init [, plain]])"
documentation reads:
"Note that if plain is given, then init must be given as well." This
is a bit surprising since a lot of other functions, like
[table.]unpack, or load, or utf8.* ones, have several optional
arguments but don't have similar notices; one would think that it says
init must be non-nil but init can be supplied as nil quite all right
in such cases:

> =string.find("xyz","y",nil,true)
2       2

That notice could as well be dropped...

Best regards,

--
DoubleF