Re: [PATCH] Add .trim method
[email protected] (Jonathan Worthington) Mon, 12 Jan 2009 17:56:42 +0100
| Newsgroups | perl.perl6.language,perl.perl6.internals |
|---|---|
| Message-ID | <[email protected]> |
Ovid wrote: > ----- Original Message ---- > > > In the pir, doesn't the "s = self" line copy self, thus ensuring that I'm changing "s" and not "self"? No, it's binding. > Or do I need "s = clone self" (or however it's written). > > Yeah, but also note that substr would return a copy... >> Can't say I really like the negated options though. They smell funny. >> > > 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... Jonathan