ZF-9280: Capitalize String

Issue Type: New Feature Created: 2010-02-27T02:59:10.000+0000 Last Updated: 2010-04-12T13:48:10.000+0000 Status: Resolved Fix version(s): - 1.10.4 (28/Apr/10)

Reporter: Sébastien CHAZALLET (sch) Assignee: Thomas Weidner (thomas) Tags: - Zend_Filter

Related issues: Attachments: - StringToCapitalize.php


For last name, we can use StringToUpper, for first name, i want that the first letter of the string to be Upper and others to be lower, so there is some code :

\_encoding = $encoding; } public function filter($value){ if ($this->\_encoding) { return ucfirst(mb\_strtolower((string) $value, $this->\_encoding)); } return ucfirst(strtolower((string) $value)); } } ?>


Posted by Sébastien CHAZALLET (sch) on 2010-02-27T03:01:43.000+0000

Source file

Posted by Thomas Weidner (thomas) on 2010-04-12T13:06:26.000+0000

Or simpler:

<pre class="highlight">
$filter = new Zend_Filter_Callback(array('callback' => 'ucfirst'));

Posted by Thomas Weidner (thomas) on 2010-04-12T13:48:10.000+0000

Closing as needs proposal. Waiting for acceptance from dev team.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.