#46806 [Asn->Csd]: mb_strimwidth

From: Date: Fri, 20 Nov 2009 11:50:41 +0000
Subject: #46806 [Asn->Csd]: mb_strimwidth
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-3279@lists.php.net to get a copy of this message
ID: 46806 Updated by: vrana@php.net Reported By: swiab0729 at gmail dot com -Status: Assigned +Status: Closed Bug Type: Documentation problem Operating System: FreeBSD PHP Version: 5.2CVS-2008-12-09 (CVS) Assigned To: moriyoshi New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2009-01-04 16:37:27] moriyoshi@php.net The behavior is correct, but the document is wrong. See http://news.php.net/php.internals/42473 ------------------------------------------------------------------------ [2008-12-09 03:35:19] swiab0729 at gmail dot com Description: ------------ When the original sring $str is longer then $width of the desired trim, the width of the truncated string returned by mb_strimwidth() will count "length of $trimmarker" in. Reproduce code: --------------- echo mb_strimwidth('helloworld', 0, 5, '...', 'UTF-8'); echo mb_strimwidth('hello', 0, 5, '...', 'UTF-8'); Expected result: ---------------- hello... hello Actual result: -------------- he... hello ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46806&edit=1

« previous php.doc.bugs (#3279) next »