src/Util/StringUtil.php
public static function stringToArray(?string $string): array {
        $result = [];
        $strLen = \strlen($string);
        if (null === $string) return $result;
        if (1 === $strLen) {
            $result[] = $string;
            return $result;
        }
        for ($i = 0; $i < $strLen; $i++) {
            $result[] = $string[$i];
        }
        return $result;
    }
public static function stringToArray(?string $string): array {
        $result = [];
        $strLen = \strlen($string);
        if (null === $string) return $result;
        if (1 === $strLen) {
            $result[] = $string;
            return $result;
        }
        for ($i = 0; $i < $strLen; $i++) {
            $result[] = $string[$i];
        }
        return $result;
    }
public static function stringToArray ( ? string $ string ) : array { $ result = [ ] ; $ strLen = \ strlen ( $ string ) ; if ( null === $ string ) return $ result ; if ( 1 === $ strLen ) { $ result [ ] = $ string ; return $ result ; } for ( $ i = 0 ; $ i < $ strLen ; $ i ++ ) { $ result [ ] = $ string [ $ i ] ; } return $ result ; }
returns an array of elements of the string

@param null|string $string

@return array
returns an array of elements of the string