PluginProbe
wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin / 6.5.1.7
wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin v6.5.1.7
6.5.1.7 6.5.1.6 6.5.1.5 6.5.1.4 6.5.1.3 6.5.1.2 6.5.1.1 6.5.0.9 6.5.0.8 6.5.0.7 6.5.0.6 trunk 3.4.2.40 3.4.2.41 3.4.2.42 3.4.2.43 3.4.2.44 3.4.2.45 3.4.2.46 3.4.2.47 3.4.2.48 3.4.2.49 3.4.2.50 6.3.2 6.3.3.1 All 47 releases
wpdatatables / lib / phpoffice / phpspreadsheet / src / PhpSpreadsheet / Calculation / TextData / CaseConvert.php

CaseConvert.php in wpDataTables – WordPress Data Table, Dynamic Tables & Table Charts Plugin 6.5.1.7, at lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php

81 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PhpOffice\PhpSpreadsheet\Calculation\TextData;
4
5 use PhpOffice\PhpSpreadsheet\Calculation\ArrayEnabled;
6 use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
7
8 class CaseConvert
9 {
10 use ArrayEnabled;
11
12 /**
13 * LOWERCASE.
14 *
15 * Converts a string value to upper case.
16 *
17 * @param mixed $mixedCaseValue The string value to convert to lower case
18 * Or can be an array of values
19 *
20 * @return array|string
21 * If an array of values is passed as the argument, then the returned result will also be an array
22 * with the same dimensions
23 */
24 public static function lower($mixedCaseValue)
25 {
26 if (is_array($mixedCaseValue)) {
27 return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
28 }
29
30 $mixedCaseValue = Helpers::extractString($mixedCaseValue);
31
32 return StringHelper::strToLower($mixedCaseValue);
33 }
34
35 /**
36 * UPPERCASE.
37 *
38 * Converts a string value to upper case.
39 *
40 * @param mixed $mixedCaseValue The string value to convert to upper case
41 * Or can be an array of values
42 *
43 * @return array|string
44 * If an array of values is passed as the argument, then the returned result will also be an array
45 * with the same dimensions
46 */
47 public static function upper($mixedCaseValue)
48 {
49 if (is_array($mixedCaseValue)) {
50 return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
51 }
52
53 $mixedCaseValue = Helpers::extractString($mixedCaseValue);
54
55 return StringHelper::strToUpper($mixedCaseValue);
56 }
57
58 /**
59 * PROPERCASE.
60 *
61 * Converts a string value to proper or title case.
62 *
63 * @param mixed $mixedCaseValue The string value to convert to title case
64 * Or can be an array of values
65 *
66 * @return array|string
67 * If an array of values is passed as the argument, then the returned result will also be an array
68 * with the same dimensions
69 */
70 public static function proper($mixedCaseValue)
71 {
72 if (is_array($mixedCaseValue)) {
73 return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $mixedCaseValue);
74 }
75
76 $mixedCaseValue = Helpers::extractString($mixedCaseValue);
77
78 return StringHelper::strToTitle($mixedCaseValue);
79 }
80 }
81