$input_stringstringrequired
$chunk_sizeintrequired
public function str_split( $input_string, $chunk_size ) {
if ( ! function_exists( 'str_split' ) ) {
$length = $this->strlen( $input_string );
$out = array();
for ( $i = 0; $i < $length; $i += $chunk_size ) {
$out[] = $this->substr( $input_string, $i, $chunk_size );
}
return $out;
} else {
return str_split( $input_string, $chunk_size );
}
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/pomo_reader/str_split