From: Bardur A. <oca...@sc...> - 2004-12-16 13:51:14
|
On Thu, Dec 16, 2004 at 01:38:06PM +0000, Richard Jones wrote: > On Thu, Dec 16, 2004 at 01:48:04PM +0100, Bardur Arantsson wrote: > > > From this you can have trimming functions: > > > > > > let triml ?(test = isspace) str = ... > > > let trimr ?(test = isspace) str = ... > > > let trim ?test str = ... > > > > ... or lstrip/rstrip/strip as they would be known > > according to the current naming conventions. :) > > > > The fact that trim takes a "test" closure instead of > > string with characters should IMHO be regarded as a > > feature and the 'old' strip should just be removed... Of > > course it may mean that the compiler cannot inline the > > "test" calls, but that is, again IMHO, a compiler issue. > > Or have both ... > It's not that I'm dead set against having both, but it just seems like interface bloat... but the functionality is certainly needed. :) -- Bardur Arantsson <ba...@im...> <ba...@sc...> - Homer no function beer well without. Homer Simpson | The Simpsons |