Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119183 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 37478 invoked from network); 18 Dec 2022 03:19:59 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Dec 2022 03:19:59 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6F0361804A7 for ; Sat, 17 Dec 2022 19:19:55 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00,HTML_MESSAGE, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24971 77.93.192.0/19 X-Spam-Virus: No X-Envelope-From: Received: from mail-mahalux.mvorisek.com (mail-mahalux.mvorisek.com [77.93.195.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 17 Dec 2022 19:19:53 -0800 (PST) Received: from 1f5946c18ec4 (10.228.0.160) by mail-mahalux.mvorisek.com (10.228.0.4) with Microsoft SMTP Server (TLS); Sun, 18 Dec 2022 04:19:51 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_4a3bab6febeb0d50758e80fc4d3b81d5" Date: Sun, 18 Dec 2022 04:19:51 +0100 To: internals@lists.php.net In-Reply-To: References: Message-ID: <752bd2d94ea0b0e4cac047cec460fea49d166b2454c6c4728be293572412321a@mahalux.com> X-Mailer: SAP NetWeaver 7.03 Subject: Re: [PHP-DEV] Re: [RFC] Unicode Text Processing From: vorismi3@fjfi.cvut.cz (=?UTF-8?Q?Michael_Vo=C5=99=C3=AD=C5=A1ek_-_=C4=8CVUT_FJFI?=) --=_4a3bab6febeb0d50758e80fc4d3b81d5 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed I also suggest `substring` instead of ugly (IMHO) `subString`. - in PHP, we have substring() function, not sub_string() - in C#, there in Substring() method, not SubString() With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem, Michael Voříšek On 16 Dec 2022 14:54, Derick Rethans wrote: > On Thu, 15 Dec 2022, Daniel Wolfe wrote: > > On 2022-12-15 8:34 AM, Derick Rethans wrote: Hi, > > I have just published an initial draft of the "Unicode Text Processing" > RFC, a proposal to have performant unicode text processing always > available to PHP users, by introducing a new "Text" class. > > You can find it at: > https://wiki.php.net/rfc/unicode_text_processing > > I'm looking forwards to hearing your opinions, additions, and > suggestions -- the RFC specifically asks for these in places. > > I love the idea, but we may want to think about using the terms > `trimStart` and `trimEnd` instead of `trimLeft` and `trimRight`. > Obviously, when the text in the parameter is in a right-to-left > language (e.g., Hebrew, Arabic), `trimLeft` and `trimRight` are going > to do the opposite of what one may expect from the names of the > functions. I know that identifiers like `ltrim` and `rtrim` are > longstanding conventions which everyone understands that they **really** > mean trimming from the start and end respectively, but this may be an > opportunity to amend the inaccuracy. That's an excellent point. And I've updated these names. cheers, Derick --=_4a3bab6febeb0d50758e80fc4d3b81d5--