Error message
You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).function drupal_ucfirst
Capitalizes the first letter of a UTF-8 string.
Parameters
$text: The string to convert.
Return value
The string with the first letter as uppercase.
Related topics
- PHP wrapper functions
- Functions that are wrappers or custom implementations of PHP functions.
6 calls to drupal_ucfirst()
- comment.tpl.php in themes/
garland/ comment.tpl.php - drupal_verify_profile in includes/
install.inc - Verifies an installation profile for installation.
- ModuleDependencyTestCase::testMissingModules in modules/
system/ system.test - Attempt to enable a module with a missing dependency.
- system_modules in modules/
system/ system.admin.inc - Menu callback; provides module enable/disable interface.
- taxonomy_help in modules/
taxonomy/ taxonomy.module - Implements hook_help().
File
-
includes/
unicode.inc, line 569
Code
function drupal_ucfirst ($text) {
// Note: no mbstring equivalent!
return drupal_strtoupper (drupal_substr ($text, 0, 1)) . drupal_substr ($text, 1);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.