note 77814 deleted from function.mb-strimwidth by salathe
| From: | salathe@php.net | Date: | Mon, 21 Sep 2020 14:57:18 +0000 |
| Subject: | note 77814 deleted from function.mb-strimwidth by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215387@lists.php.net to get a copy of this message | ||
Note Submitter: josiah dot ritchie at gmail dot com
----
While having the option to append a string to the end is nice, you can run into the problem of
having a space between the append if the width is truncated after a space. I find something like
this to be more attractive in the output, although messy in the code.
rtrim(mb_strimwidth($string, 0, 24))."..."