|
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 "string.index".
I approve of your split. drj