drupal_strtolower

Versions
4.7 – 7
drupal_strtolower($text)

Lowercase a UTF-8 string.

▾ 3 functions call drupal_strtolower()

book_export in modules/book.module
Menu callback; Generates various representation of a book page with all descendants and prints the requested representation to output.
search_index in modules/search.module
Update the full-text search index for a particular item.
search_simplify in modules/search.module
Simplifies a string according to indexing rules.

Code

includes/unicode.inc, line 377

<?php
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;
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.