| @@ 4053-4059 (lines=7) @@ | ||
| 4050 | */ |
|
| 4051 | public static function str_split($str, int $len = 1): array |
|
| 4052 | { |
|
| 4053 | if (\is_array($str) === true) { |
|
| 4054 | foreach ($str as $k => $v) { |
|
| 4055 | $str[$k] = self::str_split($v, $len); |
|
| 4056 | } |
|
| 4057 | ||
| 4058 | return $str; |
|
| 4059 | } |
|
| 4060 | ||
| 4061 | if (!isset($str[0])) { |
|
| 4062 | return []; |
|
| @@ 6313-6319 (lines=7) @@ | ||
| 6310 | */ |
|
| 6311 | public static function to_utf8($str, bool $decodeHtmlEntityToUtf8 = false) |
|
| 6312 | { |
|
| 6313 | if (\is_array($str) === true) { |
|
| 6314 | foreach ($str as $k => $v) { |
|
| 6315 | $str[$k] = self::to_utf8($v, $decodeHtmlEntityToUtf8); |
|
| 6316 | } |
|
| 6317 | ||
| 6318 | return $str; |
|
| 6319 | } |
|
| 6320 | ||
| 6321 | $str = (string)$str; |
|
| 6322 | if (!isset($str[0])) { |
|