Re: [RFC] grapheme_str_pad()
| From: | youkidearitai | Date: | Wed, 04 Nov 2026 14:31:58 +0000 |
| Subject: | Re: [RFC] grapheme_str_pad() | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-132997@lists.php.net to get a copy of this message | ||
2026年11月4日(水) 8:05 Chris Abner Herrera Navarro <chrisabner@hotmail.com>:
>
> Hi internals,
>
> I'd like to start the discussion on a new RFC:
> https://wiki.php.net/rfc/grapheme_str_pad
>
> It proposes grapheme_str_pad(), the grapheme cluster counterpart of
> str_pad() and mb_str_pad(), following the Future Scope of the mb_str_pad
> RFC. The length is counted in grapheme clusters, so text in NFD, kana with
> a combining dakuten, Indic scripts and emoji sequences are padded to the
> same visible length as their single code point equivalents, and the padding
> string is only cut on grapheme cluster boundaries.
>
> Semantics and errors mirror mb_str_pad(). For ASCII input the result is
> identical to str_pad().
>
> Implementation: https://github.com/php/php-src/pull/25179
>
> Thanks,
> Chris Abner Herrera Navarro
Hi
Thank you very much for your RFC.
It seems good to me.
And thank you for understanding grapheme functions.
Regards
Yuya
--
---------------------------
Yuya Hamada (tekimen)
- https://tekitoh-memdhoi.info
- https://github.com/youkidearitai
-----------------------------