From: John G. <jgo...@co...> - 2004-04-26 19:56:30
|
On Mon, Apr 26, 2004 at 09:43:45PM +0200, Nicolas Cannasse wrote: > > > I added the following to ExtString : > > > > > > val strip : ?chars:string -> string -> string > > > val nsplit : string -> string -> string list > > > val join : string -> string list -> string ( = concat ) > > > > > > I'm not sure about lstrip, rstrip and rchop_if > > > > lstrip and rstrip are useful in some cases. For instance, if you wish > > to remove trailing whitespace such as \n but preserve leading whitespace > > (perhaps it's indentation that you wish to keep), rstrip is useful. > > what about : strip ~chars:"\n" then ? That's not the same. If you have: " foo: \n" your strip command will not do the same as rstrip. -- John |