function drupal_strtolower

7.x unicode.inc drupal_strtolower($text)
5.x unicode.inc drupal_strtolower($text)
6.x unicode.inc drupal_strtolower($text)
8.x unicode.inc drupal_strtolower($text)

Lowercase a UTF-8 string.

Parameters

$text: The string to run the operation on.

Return value

string The string in lowercase.

Related topics

48 calls to drupal_strtolower()
block_block_list_alter in drupal/modules/block/block.module
Implements hook_block_list_alter().
book_export in drupal/modules/book/book.pages.inc
Menu callback; Generates representations of a book page and its children.
DatabaseSchema_pgsql::processField in drupal/includes/database/pgsql/schema.inc
Set database-engine specific properties for a field.
DrupalHtmlToTextTestCase::assertHtmlToText in drupal/modules/simpletest/tests/mail.test
Helper function for testing drupal_html_to_text().
drupal_html_class in drupal/includes/common.inc
Prepares a string for use as a valid class name.

... See full list

File

drupal/includes/unicode.inc, line 526
Provides Unicode-related conversions and operations.

Code

function drupal_strtolower($text) {
  global $multibyte;
  if ($multibyte == UNICODE_MULTIBYTE) {
    return mb_strtolower($text);
  }
  else {
    // Use C-locale for ASCII-only lowercase
    $text = strtolower($text);
    // Case flip Latin-1 accented letters
    $text = preg_replace_callback('/\xC3[\x80-\x96\x98-\x9E]/', '_unicode_caseflip', $text);
    return $text;
  }
}