function drupal_strtolower in Drupal 7
Same name and namespace in other branches
- 4 includes/unicode.inc \drupal_strtolower()
- 5 includes/unicode.inc \drupal_strtolower()
- 6 includes/unicode.inc \drupal_strtolower()
Lowercase a UTF-8 string.
Parameters
$text: The string to run the operation on.
Return value
string The string in lowercase.
Related topics
49 calls to drupal_strtolower()
- block_block_list_alter in modules/
block/ block.module - Implements hook_block_list_alter().
- book_export in modules/
book/ book.pages.inc - Menu callback; Generates representations of a book page and its children.
- DatabaseSchema_pgsql::processField in includes/
database/ pgsql/ schema.inc - Set database-engine specific properties for a field.
- DrupalHtmlToTextTestCase::assertHtmlToText in modules/
simpletest/ tests/ mail.test - Helper function for testing drupal_html_to_text().
- drupal_html_class in includes/
common.inc - Prepares a string for use as a valid class name.
File
- 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;
}
}