[RFC] grapheme_str_pad()

From: Date: Tue, 03 Nov 2026 23:01:51 +0000
Subject: [RFC] grapheme_str_pad()
Groups: php.internals 
Request: Send a blank email to internals+get-132995@lists.php.net to get a copy of this message
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

« previous php.internals (#132995) next »