[VOTE][RFC] Add multibyte trim function mb_trim, mb_ltrim and mb_rtrim

php.internals

youkidearitai

2 years ago
Hi, Internals I have just opened voting on the RFC to mb_trim. Voting started now, and will run until November 17th, 24:00 GMT Link: https://wiki.php.net/rfc/mb_trim#voting (It's my first time so please tell me if I'm any wrong) Regards Yuya
-- --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------

youkidearitai

2 years ago
2023年11月3日(金) 0:10 youkidearitai <youkidearitai@gmail.com>:
> > Hi, Internals > > I have just opened voting on the RFC to mb_trim. > Voting started now, and will run until November 17th, 24:00 GMT > > Link: > https://wiki.php.net/rfc/mb_trim#voting > > (It's my first time so please tell me if I'm any wrong)
Hi, Internals Voting is now closed. mb_trim, mb_ltrim and mb_rtrim of result is yes:15, no:0. I will soon change from draft pull request (https://github.com/php/php-src/pull/12459) to normal pull request. Regards Yuya.
-- --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------

mickmackusa

2 years ago
> > Voting is now closed. mb_trim, mb_ltrim and mb_rtrim of result is yes:15, > no:0. > I will soon change from draft pull request > (https://github.com/php/php-src/pull/12459) to normal pull request. > > Regards > Yuya. > >
Hi Yuya, Can you please clear up some ambiguity for me regarding mb_trim()? Is it true that the .. character range syntax will not be supported at all or is it merely that that syntax will not be allowed when one of the range limits includes a multibyte character? Is a mix of a single byte range plus individual multibyte characters allowed? If .. is attempted, will it be silently interpretted as two literal dots or will some kind of Notice be issued? I want to keep https://stackoverflow.com/a/72865139/2943403 accurate and up to date.

youkidearitai

2 years ago
2023年11月19日(日) 5:11 mickmackusa <mickmackusa@gmail.com>:
> Can you please clear up some ambiguity for me regarding mb_trim()? > > Is it true that the .. character range syntax will not be supported at all or is it merely that that syntax will not be allowed when one of the range limits includes a multibyte character? > > Is a mix of a single byte range plus individual multibyte characters allowed? > > If .. is attempted, will it be silently interpretted as two literal dots or will some kind of Notice be issued? > > I want to keep https://stackoverflow.com/a/72865139/2943403 accurate and up to date.
Hi, Yes, mb_trim series is not support ".." notation. ".." is processed as is. Because single byte character code is also Unicode mapping incompatible. For example, ISO-8859 series, KOI8-R and KOI8-U etc... Regards Yuya
-- --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------