From: Richard J. <ri...@an...> - 2006-03-06 21:01:33
|
On Mon, Mar 06, 2006 at 09:55:36PM +0100, Bardur Arantsson wrote: > Richard Jones wrote: > > Currently, String.nsplit "" _ returns a single element list: > > > > $ ocaml -I +extlib > > Objective Caml version 3.08.3 > > > > # #load "unix.cma";; > > # #load "extLib.cma";; > > # open ExtString;; > > # String.nsplit "" ",";; > > - : string list = [""] > > # String.nsplit "execute" ",";; > > - : string list = ["execute"] > > > > I would argue, however, that it'd be much better if it acted like > > Perl's split and this was special-cased to return a zero-length list: > > > > I agree. It probably more useful in general. Anyone else have any opinion on this? I would really like to change the current implementation. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com |