Re: [PATCH] Add .trim method
[email protected] (Ovid) Mon, 12 Jan 2009 09:35:03 -0800 (PST)
| Newsgroups | perl.perl6.language,perl.perl6.internals |
|---|---|
| Message-ID | <[email protected]> |
----- Original Message ---- > >> Agreed, but ltrim and rtrim will disappoint Israelis and dyslexics alike. > >> Suggestions welcome as I can't think of anything better. > > > > The .Net framework calls 'em TrimStart and TrimEnd (and has a Trim that does > > both). So maybe trim_start and trim_end if we wanted to take that lead... > > How about .trim(:start) and .trim(:end)? So if: 1. No params, trim all 2. :start or :end, only trim that bit (not a negated option :) 3. If both, goto 1 Sound good? Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6