public static function PHPExcel_Calculation_TextData::LEFT in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/TextData.php \PHPExcel_Calculation_TextData::LEFT()
* LEFT * *
Parameters
string $value Value: * @param int $chars Number of characters * @return string
1 call to PHPExcel_Calculation_TextData::LEFT()
- PHPExcel_Calculation_TextData::REPLACE in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ TextData.php - * REPLACE * *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ TextData.php, line 332
Class
- PHPExcel_Calculation_TextData
- PHPExcel_Calculation_TextData
Code
public static function LEFT($value = '', $chars = 1) {
$value = PHPExcel_Calculation_Functions::flattenSingleValue($value);
$chars = PHPExcel_Calculation_Functions::flattenSingleValue($chars);
if ($chars < 0) {
return PHPExcel_Calculation_Functions::VALUE();
}
if (is_bool($value)) {
$value = $value ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE();
}
if (function_exists('mb_substr')) {
return mb_substr($value, 0, $chars, 'UTF-8');
}
else {
return substr($value, 0, $chars);
}
}