develooper Front page | perl.perl5.porters | Postings from November 2020

Re: Looking for someone to adopt adding trim() to core

Thread Previous | Thread Next
From:
Dan Book
Date:
November 24, 2020 00:52
Subject:
Re: Looking for someone to adopt adding trim() to core
Message ID:
CABMkAVWv7_XguSWOJg66PS2x-ycDSh37iHEm-ZzKN2t6-Kkp2g@mail.gmail.com
On Mon, Nov 23, 2020 at 7:46 PM L A Walsh <Astara@tlinx.org> wrote:

> On 2020/11/18 08:37, Dan Book wrote:
> > On Wed, Nov 18, 2020 at 3:17 AM L A Walsh <Astara@tlinx.org
> > <mailto:Astara@tlinx.org>> wrote:
> > The documentation added by the PR explains it. It removes leading and
> > trailing whitespace.
> ----
>     That begs the questions:
>     0) if whitespace, that includes tabs, LF's CR's, i.e.
>        any thing '\s' matches?
>     1) What if I only want to trim at beginning or end?
>     2) Why not support a regex like, say, TCL does?
>
>     I.e. why should a perl command be limited to only trimming
> whitespace?
>

This has been discussed in the feature request ticket, summed up at
https://github.com/Perl/perl5/issues/17952#issuecomment-658462652.

-Dan

Thread Previous | Thread Next


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