@@ 86-93 (lines=8) @@ | ||
83 | * @param string $string |
|
84 | * @return string |
|
85 | */ |
|
86 | public static function lower($string) |
|
87 | { |
|
88 | if (function_exists('mb_strtolower')) { |
|
89 | return mb_strtolower($string, static::getEncoding()); |
|
90 | } |
|
91 | ||
92 | return static::replaceByMap($string, static::$cyrillicAlphabet[0], static::$cyrillicAlphabet[1]); |
|
93 | } |
|
94 | ||
95 | /** |
|
96 | * Upper case. |
|
@@ 100-107 (lines=8) @@ | ||
97 | * @param string $string |
|
98 | * @return bool|string |
|
99 | */ |
|
100 | public static function upper($string) |
|
101 | { |
|
102 | if (function_exists('mb_strtoupper')) { |
|
103 | return mb_strtoupper($string, static::getEncoding()); |
|
104 | } |
|
105 | ||
106 | return static::replaceByMap($string, static::$cyrillicAlphabet[1], static::$cyrillicAlphabet[0]); |
|
107 | } |
|
108 | ||
109 | /** |
|
110 | * Name case. (ex: Thomas, Lewis). Works properly with separated by '-' words |