note 119572 added to function.strtoupper
| From: | uilmindatfavor.com.ua | Date: | Sat, 09 Jul 2016 22:36:46 +0000 |
| Subject: | note 119572 added to function.strtoupper | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-205935@lists.php.net to get a copy of this message | ||
Here is how to make the character in upper case, except HTML-entities:
$s = substr(preg_replace('/(?<=^|;)(.+?)(?=&[0-9A-Za-z]+;|$)/e',
"strtoupper('$1')", ' '.$s), 1);
There is small kludge, however. Unfortunately I tired to find out the way how to exclude HTML-entity
at the start of the line, so I have added 1 dummy character at the start of the text and removing it
after the conversion.
----
Server IP: 72.52.91.14
Probable Submitter: 91.200.180.180
----
Manual Page -- http://php.net/manual/en/function.strtoupper.php
Edit -- https://master.php.net/note/edit/119572
Del: integrated -- https://master.php.net/note/delete/119572/integrated
Del: useless -- https://master.php.net/note/delete/119572/useless
Del: bad code -- https://master.php.net/note/delete/119572/bad+code
Del: spam -- https://master.php.net/note/delete/119572/spam
Del: non-english -- https://master.php.net/note/delete/119572/non-english
Del: in docs -- https://master.php.net/note/delete/119572/in+docs
Del: other reasons-- https://master.php.net/note/delete/119572
Reject -- https://master.php.net/note/reject/119572
Search -- https://master.php.net/manage/user-notes.php