develooper Front page | perl.perl5.porters | Postings from May 2021

Re: Revisiting trim

Thread Previous
From:
Scott Baker
Date:
May 26, 2021 21:16
Subject:
Re: Revisiting trim
Message ID:
6539ad4e-d225-c9bf-297a-7802cd251ff6@perturb.org
On 5/26/21 2:13 PM, Alberto Simões wrote:
>
> On Wednesday, May 26th, 2021 at 21:55, Uri Guttman
> <uri@stemsystems.com> wrote:
>
>>
>> what about trimmed using context? in a void context it trims in
>> place. in scalar (or non-void) it returns the trimmed string and
>> leaves the input unchanged. only one new function and we use context
>> everywhere so it is familiar.
>>
>>
> While I like the idea, we would need to make other methods to have
> similar behavior:
>    - lc / uc / ucfirst
>    - chomp / chop
> and probably others.
>
> My 5 cents

Using context for trim() has already been discussed several times and
shot down.

- Scott


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About