You are here

public static function PHPExcel_Shared_String::StrCaseReverse in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/String.php \PHPExcel_Shared_String::StrCaseReverse()

* Reverse the case of a string, so that all uppercase characters become lowercase and all lowercase characters become uppercase * *

Parameters

string $pValue UTF-8 encoded string: * @return string

1 call to PHPExcel_Shared_String::StrCaseReverse()
PHPExcel_Calculation::strcmpLowercaseFirst in vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php
* Compare two strings in the same way as strcmp() except that lowercase come before uppercase letters *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/String.php, line 648

Class

PHPExcel_Shared_String
PHPExcel_Shared_String

Code

public static function StrCaseReverse($pValue = '') {
  if (self::getIsMbstringEnabled()) {
    $characters = self::mb_str_split($pValue);
    foreach ($characters as &$character) {
      if (self::mb_is_upper($character)) {
        $character = mb_strtolower($character, 'UTF-8');
      }
      else {
        $character = mb_strtoupper($character, 'UTF-8');
      }
    }
    return implode('', $characters);
  }
  return strtolower($pValue) ^ strtoupper($pValue) ^ $pValue;
}