Re: Re: [RFC] Unicode Text Processing
| From: | Michael Voříšek - ČVUT FJFI | Date: | Sun, 18 Dec 2022 03:19:51 +0000 |
| Subject: | Re: Re: [RFC] Unicode Text Processing | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-119183@lists.php.net to get a copy of this message | ||
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 termsThat's an excellent point. And I've updated these names. cheers, DericktrimStartandtrimEndinstead oftrimLeftandtrimRight. Obviously, when the text in the parameter is in a right-to-left language (e.g., Hebrew, Arabic),trimLeftandtrimRightare going to do the opposite of what one may expect from the names of the functions. I know that identifiers likeltrimandrtrimare 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.