On this page
POMO_Reader::str_split( string $string, int $chunk_size ): array
Parameters
$stringstring Required$chunk_sizeint Required
Return
array
Source
File: wp-includes/pomo/streams.php. View all references
public function str_split( $string, $chunk_size ) {
if ( ! function_exists( 'str_split' ) ) {
$length = $this->strlen( $string );
$out = array();
for ( $i = 0; $i < $length; $i += $chunk_size ) {
$out[] = $this->substr( $string, $i, $chunk_size );
}
return $out;
} else {
return str_split( $string, $chunk_size );
}
}
Related
Uses
| Uses | Description |
|---|---|
| POMO_Reader::strlen() wp-includes/pomo/streams.php | |
| POMO_Reader::substr() wp-includes/pomo/streams.php |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/pomo_reader/str_split