| @@ 5071-5077 (lines=7) @@ | ||
| 5068 | */ |
|
| 5069 | public static function str_split($str, int $len = 1): array |
|
| 5070 | { |
|
| 5071 | if (\is_array($str) === true) { |
|
| 5072 | foreach ($str as $k => $v) { |
|
| 5073 | $str[$k] = self::str_split($v, $len); |
|
| 5074 | } |
|
| 5075 | ||
| 5076 | return $str; |
|
| 5077 | } |
|
| 5078 | ||
| 5079 | if (!isset($str[0])) { |
|
| 5080 | return []; |
|
| @@ 7440-7446 (lines=7) @@ | ||
| 7437 | */ |
|
| 7438 | public static function to_utf8($str, bool $decodeHtmlEntityToUtf8 = false) |
|
| 7439 | { |
|
| 7440 | if (\is_array($str) === true) { |
|
| 7441 | foreach ($str as $k => $v) { |
|
| 7442 | $str[$k] = self::to_utf8($v, $decodeHtmlEntityToUtf8); |
|
| 7443 | } |
|
| 7444 | ||
| 7445 | return $str; |
|
| 7446 | } |
|
| 7447 | ||
| 7448 | $str = (string)$str; |
|
| 7449 | if (!isset($str[0])) { |
|