| 7 unicode.inc | drupal_ucfirst($text) |
| 4.7 unicode.inc | drupal_ucfirst($text) |
| 5 unicode.inc | drupal_ucfirst($text) |
| 6 unicode.inc | drupal_ucfirst($text) |
| 8 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
4 calls to drupal_ucfirst()
- 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 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);
}