You are here

function securepages_strtolower in Secure Pages 6

Same name and namespace in other branches
  1. 6.2 securepages.module \securepages_strtolower()

Lowercase a UTF-8 string.

Parameters

$text: The string to run the operation on.

Return value

string The string in lowercase.

1 call to securepages_strtolower()
securepages_match in ./securepages.module
securepages_match()

File

./securepages.module, line 440
Provide method of creating allowing certain pages to only viewable from https pages

Code

function securepages_strtolower($text) {
  global $multibyte;
  if ($multibyte == 1) {
    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]/', '_securepages_unicode_caseflip', $text);
    return $text;
  }
}