@@ 384-393 (lines=10) @@ | ||
381 | * |
|
382 | * @return int |
|
383 | */ |
|
384 | public static function STRINGLENGTH($value = '') |
|
385 | { |
|
386 | $value = Functions::flattenSingleValue($value); |
|
387 | ||
388 | if (is_bool($value)) { |
|
389 | $value = ($value) ? \PhpOffice\PhpSpreadsheet\Calculation::getTRUE() : \PhpOffice\PhpSpreadsheet\Calculation::getFALSE(); |
|
390 | } |
|
391 | ||
392 | return mb_strlen($value, 'UTF-8'); |
|
393 | } |
|
394 | ||
395 | /** |
|
396 | * LOWERCASE. |
|
@@ 404-413 (lines=10) @@ | ||
401 | * |
|
402 | * @return string |
|
403 | */ |
|
404 | public static function LOWERCASE($mixedCaseString) |
|
405 | { |
|
406 | $mixedCaseString = Functions::flattenSingleValue($mixedCaseString); |
|
407 | ||
408 | if (is_bool($mixedCaseString)) { |
|
409 | $mixedCaseString = ($mixedCaseString) ? \PhpOffice\PhpSpreadsheet\Calculation::getTRUE() : \PhpOffice\PhpSpreadsheet\Calculation::getFALSE(); |
|
410 | } |
|
411 | ||
412 | return \PhpOffice\PhpSpreadsheet\Shared\StringHelper::strToLower($mixedCaseString); |
|
413 | } |
|
414 | ||
415 | /** |
|
416 | * UPPERCASE. |
|
@@ 424-433 (lines=10) @@ | ||
421 | * |
|
422 | * @return string |
|
423 | */ |
|
424 | public static function UPPERCASE($mixedCaseString) |
|
425 | { |
|
426 | $mixedCaseString = Functions::flattenSingleValue($mixedCaseString); |
|
427 | ||
428 | if (is_bool($mixedCaseString)) { |
|
429 | $mixedCaseString = ($mixedCaseString) ? \PhpOffice\PhpSpreadsheet\Calculation::getTRUE() : \PhpOffice\PhpSpreadsheet\Calculation::getFALSE(); |
|
430 | } |
|
431 | ||
432 | return \PhpOffice\PhpSpreadsheet\Shared\StringHelper::strToUpper($mixedCaseString); |
|
433 | } |
|
434 | ||
435 | /** |
|
436 | * PROPERCASE. |
|
@@ 444-453 (lines=10) @@ | ||
441 | * |
|
442 | * @return string |
|
443 | */ |
|
444 | public static function PROPERCASE($mixedCaseString) |
|
445 | { |
|
446 | $mixedCaseString = Functions::flattenSingleValue($mixedCaseString); |
|
447 | ||
448 | if (is_bool($mixedCaseString)) { |
|
449 | $mixedCaseString = ($mixedCaseString) ? \PhpOffice\PhpSpreadsheet\Calculation::getTRUE() : \PhpOffice\PhpSpreadsheet\Calculation::getFALSE(); |
|
450 | } |
|
451 | ||
452 | return \PhpOffice\PhpSpreadsheet\Shared\StringHelper::strToTitle($mixedCaseString); |
|
453 | } |
|
454 | ||
455 | /** |
|
456 | * REPLACE. |