public static function PHPExcel_Calculation_TextData::REPLACE in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/TextData.php \PHPExcel_Calculation_TextData::REPLACE()
* REPLACE * *
Parameters
string $oldText String to modify: * @param int $start Start character * @param int $chars Number of characters * @param string $newText String to replace in defined position * @return string
1 call to PHPExcel_Calculation_TextData::REPLACE()
- PHPExcel_Calculation_TextData::SUBSTITUTE in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ TextData.php - * SUBSTITUTE * *
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ TextData.php, line 495
Class
- PHPExcel_Calculation_TextData
- PHPExcel_Calculation_TextData
Code
public static function REPLACE($oldText = '', $start = 1, $chars = null, $newText) {
$oldText = PHPExcel_Calculation_Functions::flattenSingleValue($oldText);
$start = PHPExcel_Calculation_Functions::flattenSingleValue($start);
$chars = PHPExcel_Calculation_Functions::flattenSingleValue($chars);
$newText = PHPExcel_Calculation_Functions::flattenSingleValue($newText);
$left = self::LEFT($oldText, $start - 1);
$right = self::RIGHT($oldText, self::STRINGLENGTH($oldText) - ($start + $chars) + 1);
return $left . $newText . $right;
}