A_Z_Listing::mb_string_to_array( string $string )

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


Description


Parameters

$string

(string) (Required) multi-byte string.


Return

(array) individual multi-byte characters from the string


Source

File: classes/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
VersionDescription
1.0.0Introduced.

More Information

You are currently logged out. To view tickets you must first login.

I have read and understood the Terms of Service



User Contributed Notes

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.