From: Bardur A. <sp...@sc...> - 2006-03-06 20:56:47
|
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. -- Bardur Arantsson <bar...@TH...> <bar...@TH...> - If you want something done properly, kill Baldrick before you start. Edmund Blackadder, 'Blackadder III' |