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:
L A Walsh
Date:
November 24, 2020 00:46
Subject:
Re: Looking for someone to adopt adding trim() to core
Message ID:
5FBC57D1.8070800@tlinx.org
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?

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