POMO_Reader::str_split( string $string, int $chunk_size )


Description Description


Parameters Parameters

$string

(string) (Required)

$chunk_size

(int) (Required)


Top ↑

Return Return

(array)


Top ↑

Source Source

File: wp-includes/pomo/streams.php

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


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.