[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: new string functions (was Re: Standard Libraries....)
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 29 Dec 2009 12:39:05 +0200
On Tue, Dec 29, 2009 at 10:04 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> Lua is unique in that all string searching/substitution functions use
> patterns, not literals.
Which suggests that split (like string.find) should have another
argument to force a plain search. Tradition suggests that the second
argument should be an optional number-of-separators limit to extract,
so it would have to be the third arg, with some value for 'limit'
chosen to mean 'no limit':
split('127.0.0.1','.',-1,true) -> {'127','0','0','1'}
steve d.