POMO_Reader::str_split()publicWP 1.0

Method of the class: POMO_Reader{}

No Hooks.

Return

Array.

Usage

$POMO_Reader = new POMO_Reader();
$POMO_Reader->str_split( $string, $chunk_size );
$string(string) (required)
-
$chunk_size(int) (required)
-

POMO_Reader::str_split() code WP 6.1.1

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 );
	}
}