Req #23501 [Opn->Csd]: Add mb_trim(), mb_rtrim() and mb_ltrim() counterparts

From: Date: Thu, 07 Apr 2022 14:53:12 +0000
Subject: Req #23501 [Opn->Csd]: Add mb_trim(), mb_rtrim() and mb_ltrim() counterparts
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240764@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=23501&edit=1 ID: 23501 Updated by: ilutov@php.net Reported by: jc at mega-bucks dot co dot jp Summary: Add mb_trim(), mb_rtrim() and mb_ltrim() counterparts -Status: Open +Status: Closed Type: Feature/Change Request Package: mbstring related Operating System: * PHP Version: * -Assigned To: +Assigned To: ilutov Block user comment: N Private report: N New Comment: This feature request has been open for a long time with no action. We're migrating away from bugs.php.net, if this is still desired please create a new issue on GitHub. Previous Comments: ------------------------------------------------------------------------ [2017-09-17 23:11:52] yohgaki@php.net Related To: Bug #75214 ------------------------------------------------------------------------ [2017-09-16 13:28:30] cmb@php.net Related To: Bug #75214 ------------------------------------------------------------------------ [2003-05-06 01:18:33] jc at mega-bucks dot co dot jp I'd like to ask that a multibyte-safe version of trim() be added to PHP. If possible with this functionality: String trim(string str, [string encoding], [string charlist]) 1- automatically determine encoding of given string and remove that encoding's "whitespace". I.e if I pass an ASCII string it would act just as the current trim(), if I pass in an SJIS string it would remove whatever is considered "whitespace" for that character set (including full-width spaces). Automatically determining the encoding of a string is not always possible, in that case the function promises only a "best guess" at the string's encoding. 2- Optional parameter that gives the string's encoding. 3- An optional list of characters to be considered "whitespace" instead of the function's built-in default list. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=23501&edit=1

« previous php.bugs (#240764) next »