lua-users home
lua-l archive

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


If you mean a function like strstr(str, find), which would return you
the position of the substring find in string str, this does NOT exist
in SIMPLE form in Lua string library ... you have to use string.find
or similar for this with such "match pattern".

I must admit that I also do NOT like this very much ... when I made my
own "static string lib" for minumum RAM requirement Lua (< 40-60kB Lua
stack), I also added such a "simple find function" similar to strstr.

On Tue, Jun 14, 2022 at 1:46 AM Ryan Starrett <pyryanggg@gmail.com> wrote:
>
> Subject, basically. It's similar to the behavior found in Python, I'm just curious if there's an existing patch for it. Otherwise, are there resources that can help me make one?