# tablepress/3.4/libraries/vendor/PhpSpreadsheet/Calculation/TextData/CaseConvert.php

TablePress – Tables in WordPress made easy, version 3.4. 91 lines.

- Page: https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Calculation/TextData/CaseConvert.php
- Raw: https://pluginprobe.com/plugins/tablepress/3.4/raw/libraries/vendor/PhpSpreadsheet/Calculation/TextData/CaseConvert.php
- Modified: 2025-08-26T04:06:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Calculation/TextData/CaseConvert.php#L10-L20`.

```php
<?php

namespace TablePress\PhpOffice\PhpSpreadsheet\Calculation\TextData;

use TablePress\PhpOffice\PhpSpreadsheet\Calculation\ArrayEnabled;
use TablePress\PhpOffice\PhpSpreadsheet\Calculation\Exception as CalcExp;
use TablePress\PhpOffice\PhpSpreadsheet\Shared\StringHelper;

class CaseConvert
{
	use ArrayEnabled;

	/**
	 * LOWERCASE.
	 *
	 * Converts a string value to upper case.
	 *
	 * @param mixed $mixedCaseValue The string value to convert to lower case
	 *                              Or can be an array of values
	 *
	 * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
	 *            with the same dimensions
	 */
	public static function lower($mixedCaseValue)
	{
		if (is_array($mixedCaseValue)) {
			return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
		}

		try {
			$mixedCaseValue = Helpers::extractString($mixedCaseValue, true);
		} catch (CalcExp $e) {
			return $e->getMessage();
		}

		return StringHelper::strToLower($mixedCaseValue);
	}

	/**
	 * UPPERCASE.
	 *
	 * Converts a string value to upper case.
	 *
	 * @param mixed $mixedCaseValue The string value to convert to upper case
	 *                              Or can be an array of values
	 *
	 * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
	 *            with the same dimensions
	 */
	public static function upper($mixedCaseValue)
	{
		if (is_array($mixedCaseValue)) {
			return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
		}

		try {
			$mixedCaseValue = Helpers::extractString($mixedCaseValue, true);
		} catch (CalcExp $e) {
			return $e->getMessage();
		}

		return StringHelper::strToUpper($mixedCaseValue);
	}

	/**
	 * PROPERCASE.
	 *
	 * Converts a string value to proper or title case.
	 *
	 * @param mixed $mixedCaseValue The string value to convert to title case
	 *                              Or can be an array of values
	 *
	 * @return array<mixed>|string If an array of values is passed as the argument, then the returned result will also be an array
	 *            with the same dimensions
	 */
	public static function proper($mixedCaseValue)
	{
		if (is_array($mixedCaseValue)) {
			return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
		}

		try {
			$mixedCaseValue = Helpers::extractString($mixedCaseValue, true);
		} catch (CalcExp $e) {
			return $e->getMessage();
		}

		return StringHelper::strToTitle($mixedCaseValue);
	}
}

```
