From: Richard J. <ri...@an...> - 2004-12-16 13:38:14
|
On Thu, Dec 16, 2004 at 01:48:04PM +0100, Bardur Arantsson wrote: > > From this you can have trimming functions: > >=20 > > let triml ?(test =3D isspace) str =3D ... > > let trimr ?(test =3D isspace) str =3D ... > > let trim ?test str =3D ... >=20 > ... or lstrip/rstrip/strip as they would be known > according to the current naming conventions. :) >=20 > 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 ... Rich. --=20 Richard Jones. http://www.annexia.org/ http://www.j-london.com/ >>> http://www.team-notepad.com/ - collaboration tools for teams <<< Merjis Ltd. http://www.merjis.com/ - improving website return on investment Use Perl libs in OCaml - http://www.merjis.com/developers/perl4caml |