note 98958 added to function.mb-substr
| From: | levani9191 at gmail dot com | Date: | Sun, 18 Jul 2010 10:37:30 +0000 |
| Subject: | note 98958 added to function.mb-substr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-170949@lists.php.net to get a copy of this message | ||
A simple code that check if the latest symbol in the string is a question mark and adds one if it
doesn't...
<?php $string = (mb_substr($string, -1, 1, 'UTF-8') != '?') ?
$string.'?' : $string; ?>
----
Server IP: 69.147.83.197
Probable Submitter: 93.186.222.144
----
Manual Page -- http://www.php.net/manual/en/function.mb-substr.php
Edit -- https://master.php.net/note/edit/98958
Del: integrated -- https://master.php.net/note/delete/98958/integrated
Del: useless -- https://master.php.net/note/delete/98958/useless
Del: bad code -- https://master.php.net/note/delete/98958/bad+code
Del: spam -- https://master.php.net/note/delete/98958/spam
Del: non-english -- https://master.php.net/note/delete/98958/non-english
Del: in docs -- https://master.php.net/note/delete/98958/in+docs
Del: other reasons-- https://master.php.net/note/delete/98958
Reject -- https://master.php.net/note/reject/98958
Search -- https://master.php.net/manage/user-notes.php