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

6 calls to drupal_ucfirst()
comment.tpl.php in drupal/themes/garland/comment.tpl.php
drupal_verify_profile in drupal/includes/install.inc
Verifies an installation profile for installation.
ModuleDependencyTestCase::testMissingModules in drupal/modules/system/system.test
Attempt to enable a module with a missing dependency.
system_modules in drupal/modules/system/system.admin.inc
Menu callback; provides module enable/disable interface.
taxonomy_help in drupal/modules/taxonomy/taxonomy.module
Implements hook_help().

... See full list

File

drupal/includes/unicode.inc, line 566
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);
}