drupal_ucfirst

Definition

drupal_ucfirst($text)
includes/unicode.inc, line 456

Description

Capitalize the first letter of a UTF-8 string.

Code

<?php
function drupal_ucfirst($text) {
  // Note: no mbstring equivalent!
  return drupal_strtoupper(drupal_substr($text, 0, 1)) . drupal_substr($text, 1);
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.