[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua string library partially reimplemented in Lua
- From: David Jones <drj@...>
- Date: Fri, 19 Sep 2008 10:20:40 +0100
On 19 Sep 2008, at 02:44, David Manura wrote:
So, how about these string functions for Lua 5.2?
(2) string.smatch (s, s2, [, init, [, final ] ])
This searches for the string s2 in the string s, returning the
position. The search is optionally bounded in the range [init,
final]. Set init == final to match at a specific position (it's
sort-of like string.sub). Perhaps it would be useful to add the
optional "final" parameter to the string.match function too.
This operation, for better or worse, is usually called "index", as in
I approve of your split.