You are here

public static function PHPExcel_Calculation_TextData::CHARACTER in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/TextData.php \PHPExcel_Calculation_TextData::CHARACTER()

* CHARACTER * *

Parameters

string $character Value: * @return int

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/TextData.php, line 74

Class

PHPExcel_Calculation_TextData
PHPExcel_Calculation_TextData

Code

public static function CHARACTER($character) {
  $character = PHPExcel_Calculation_Functions::flattenSingleValue($character);
  if (!is_numeric($character) || $character < 0) {
    return PHPExcel_Calculation_Functions::VALUE();
  }
  if (function_exists('mb_convert_encoding')) {
    return mb_convert_encoding('&#' . intval($character) . ';', 'UTF-8', 'HTML-ENTITIES');
  }
  else {
    return chr(intval($character));
  }
}