function drupal_ucfirst
7.x unicode.inc | drupal_ucfirst($text) |
6.x unicode.inc | drupal_ucfirst($text) |
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
6 calls to drupal_ucfirst()
- comment.tpl.php in drupal-7.x/
themes/ garland/ comment.tpl.php - drupal_verify_profile in drupal-7.x/
includes/ install.inc - Verifies an installation profile for installation.
- ModuleDependencyTestCase::testMissingModules in drupal-7.x/
modules/ system/ system.test - Attempt to enable a module with a missing dependency.
- system_modules in drupal-7.x/
modules/ system/ system.admin.inc - Menu callback; provides module enable/disable interface.
- taxonomy_help in drupal-7.x/
modules/ taxonomy/ taxonomy.module - Implements hook_help().
File
- drupal-7.x/
includes/ unicode.inc, line 562 - Provides Unicode-related conversions and operations.
Code
function drupal_ucfirst($text) {
// Note: no mbstring equivalent!
return drupal_strtoupper(drupal_substr($text, 0, 1)) . drupal_substr($text, 1);
}