A_Z_Listing::mb_string_to_array( string $string )

Split a multibyte string into an array. (see http://php.net/manual/en/function.mb-split.php#80046)


Description


Parameters

$string

(string) (Required) multi-byte string


Return

(array) individual multi-byte characters from the string


Source

File: partials/class-a-z-listing.php

	public static function mb_string_to_array( $string ) {
		$array = array();
		$length = mb_strlen( $string );
		while ( $length ) {
			$array[] = mb_substr( $string, 0, 1, 'UTF-8' );
			$string = mb_substr( $string, 1, $length, 'UTF-8' );
			$length = mb_strlen( $string );
		}
		return $array;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.


User Contributed Notes

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