Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115116 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 78996 invoked from network); 24 Jun 2021 11:49:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Jun 2021 11:49:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EEE0E1804DB for ; Thu, 24 Jun 2021 05:08:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 24 Jun 2021 05:08:18 -0700 (PDT) Received: by mail-ua1-f53.google.com with SMTP id c47so1405093uad.1 for ; Thu, 24 Jun 2021 05:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YGc9IRP00dPywsK3VGs/BWoduYWitmJgYatldAe3c8s=; b=WtdFki3giSgPnIJ0cVnc7sPgtU9OrE3l5Mv8vEKG8+ju3BitjGLryHtJ6JTQDbI+t6 74UhV70na8AdXpC18ivvxrT0xpvxQ0dHJkXIll+vDu38AMBkFiaqei/5rIfTtq4ie4pt UmUnt7AAsF0KDom5Il/0wyoUNYysAG9wmUKhm0GHrW0QKfB/IyfSHpwjFYUXMg7zCDq3 acxvIwZjLaSSpiOnkgWtnj0qrkwTPiLlgglLLfvMYlmJfXQlzmUWMUw9tTolJazlSXVQ 8NEQsmVm3g9pm+By0D6lKDzzDNDknIqia8DMD0dJbNZc2a3on+AAtNdq4pTb+0lqufFz IBtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YGc9IRP00dPywsK3VGs/BWoduYWitmJgYatldAe3c8s=; b=CD/IylEAdK8K7kLIyMolf9eE29GAqH1oMfPUNkQqVVoY8COoPTOQ23wNToOuwFDasM w+Y9NtTc1pCiKDwkapCs6TBZjVVzP2vxZ+3n0hiiQfcefVuDtUPx9/azGZ4y5uacET26 EnTJsN7CFIFzGsT/h6QcnScsytz49tN8OubJzz0tMGPqnKlzhgY49LSUV/GmfrUlPzP+ iCRO5TptQ+PLI8m6gyxLdPWSzZ6CgIuB0ePUE63/WNkNZ6hATHWvTWnngKDJKjz01mhG Yo6tdu7rmaOFcUHzaSmYk+QISRx7Ju/cJrgNvwJq1B03hwk92p10/p9MiTKed3VD11/c yA3w== X-Gm-Message-State: AOAM531dTSv6zNPGtp3oizj4lc/AZQydsrEtHcGhxi1b+t5NEAP2UbnQ vJJGmMTWJn6SHMpGKNy/4SVRfzp63ekoFC4jj48= X-Google-Smtp-Source: ABdhPJy+893KQKVA1IqKIveO/2zPI2zwtI5BHuBiY2gNwVcxHwPpC7VwfcsnwLPRa3S5gjDhzdRdMLUtXWFB/7mX2oA= X-Received: by 2002:ab0:2a59:: with SMTP id p25mr4840383uar.81.1624536495620; Thu, 24 Jun 2021 05:08:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:3b8f:0:0:0:0:0 with HTTP; Thu, 24 Jun 2021 05:08:15 -0700 (PDT) In-Reply-To: References: <012901d7683a$446a7ba0$cd3f72e0$@gmail.com> Date: Thu, 24 Jun 2021 17:08:15 +0500 Message-ID: To: Andreas Leathley Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Introduce str_left/right In 8.1 From: office.hamzaahmad@gmail.com (Hamza Ahmad) > I can also imagine bikeshed... This is what can be discussed apart from whether these function come to PHP. I am waiting for the other voices; there is surely someone that can come up with a more creative name, a name that is short yet descriptive. > str_left_part/str_right_part is just what came to mind, I thank you, Andreas, for suggesting new names. You are right that substr can give surprising results. Str_starts_with and ends_with return bool, not strings. So, we do have need of these functions. Best