Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119174 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 1649 invoked from network); 16 Dec 2022 13:55:13 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Dec 2022 13:55:13 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 83144180551 for ; Fri, 16 Dec 2022 05:55:12 -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,SPF_HELO_PASS, SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS30827 82.113.144.0/20 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Fri, 16 Dec 2022 05:55:12 -0800 (PST) Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id E10DE10C0AB; Fri, 16 Dec 2022 13:55:11 +0000 (GMT) Date: Fri, 16 Dec 2022 13:55:11 +0000 (GMT) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= cc: PHP Developers Mailing List In-Reply-To: Message-ID: References: User-Agent: Alpine 2.23 (DEB 453 2020-06-18) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-407618556-1671196384=:462551" Subject: Re: [PHP-DEV] [RFC] Unicode Text Processing From: derick@php.net (Derick Rethans) --8323329-407618556-1671196384=:462551 Content-Type: text/plain; CHARSET=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 15 Dec 2022, Tim D=C3=BCsterhus wrote: > On 12/15/22 16:34, Derick Rethans wrote: > > You can find it at: > > https://wiki.php.net/rfc/unicode_text_processing > >=20 > > I'm looking forwards to hearing your opinions, additions, and > > suggestions =E2=80=94 the RFC specifically asks for these in places. >=20 > Some first remarks: >=20 > ---------- >=20 > replaceText(): >=20 > In the replaceText() section the description refers to a non-existent > parameters '$maxReplacements' and '$collator'. Also the second paragraph = in > that section looks like a word is missing there. I will update this. the ''$collator'' would be an argument to the=20 constructor of the Text/$search argument, not the method itself. > ---------- >=20 > getPositionOfFirstOccurrence(): >=20 > I agree this is too long. How about: >=20 > - findOffset() > - findOffsetLast() >=20 > And for returnFromFirstOccurence(): >=20 > - startingWith() > - startingWithLast() I have included these as suggested names. I suspect we'll get more :-) > ---------- >=20 > firstToTitle(): >=20 > I don't see how this differs from toTitle() and/or firstToUpper(). An exa= mple > would likely be helpful. It doesn't differ from firstToUpper, so I will remove it. > ---------- >=20 > wordsToTitle(): >=20 > Likewise. It doesn't differ either from toTitle, so I will remove it. I have also added examples for the others. > ---------- >=20 > The return of many methods is not explicitly listed. I'd put it everywher= e to > make it 100% clear that all those functions return 'Text'. I will update that. cheers, Derick --=20 https://derickrethans.nl | https://xdebug.org | https://dram.io Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/suppo= rt Host of PHP Internals News: https://phpinternals.news mastodon: @derickr@phpc.social @xdebug@phpc.social twitter: @derickr and @xdebug --8323329-407618556-1671196384=:462551--