You are here

public static function PHPExcel_Calculation_TextData::TRIMNONPRINTABLE in Loft Data Grids 7.2

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

* TRIMNONPRINTABLE * *

Parameters

mixed $stringValue Value to check: * @return string

File

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

Class

PHPExcel_Calculation_TextData
PHPExcel_Calculation_TextData

Code

public static function TRIMNONPRINTABLE($stringValue = '') {
  $stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue);
  if (is_bool($stringValue)) {
    return $stringValue ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
  }
  if (self::$_invalidChars == Null) {
    self::$_invalidChars = range(chr(0), chr(31));
  }
  if (is_string($stringValue) || is_numeric($stringValue)) {
    return str_replace(self::$_invalidChars, '', trim($stringValue, "\0..\37"));
  }
  return NULL;
}