You are here

function drupal_ucfirst in Drupal 7

Same name and namespace in other branches
  1. 4 includes/unicode.inc \drupal_ucfirst()
  2. 5 includes/unicode.inc \drupal_ucfirst()
  3. 6 includes/unicode.inc \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 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().

... See full list

File

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);
}