POMO_Reader::str_split()

最后更新于:2021-11-25 22:30:21

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

参数

$string

(string) (Required)

$chunk_size

(int) (Required)

响应

(array)

源文件

文件: gc-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 );
			}
		}