note 95191 added to function.mb-split

From: Date: Thu, 17 Dec 2009 13:31:17 +0000
Subject: note 95191 added to function.mb-split
Groups: php.notes 
Request: Send a blank email to php-notes+get-164082@lists.php.net to get a copy of this message
My version of gert's multibyte mbStringToArray() function with the ability to specify your own split_length instead of 1 (like the original str_split function): <?php function mb_str_split($string, $split_length){ mb_internal_encoding( 'UTF-8'); mb_regex_encoding( 'UTF-8'); $mb_strlen = mb_strlen($string, 'utf-8'); if($mb_strlen > $split_length){ $array = array(); for($idx = 0; $idx < $mb_strlen; $idx + $split_length){ $array[] = mb_substr($string, $idx, $split_length); } return $array; }else{ return $string; } } ?> ---- Server IP: 83.137.20.135 Probable Submitter: 83.86.6.216 ---- Manual Page -- http://www.php.net/manual/en/function.mb-split.php Edit -- https://master.php.net/note/edit/95191 Del: integrated -- https://master.php.net/note/delete/95191/integrated Del: useless -- https://master.php.net/note/delete/95191/useless Del: bad code -- https://master.php.net/note/delete/95191/bad+code Del: spam -- https://master.php.net/note/delete/95191/spam Del: non-english -- https://master.php.net/note/delete/95191/non-english Del: in docs -- https://master.php.net/note/delete/95191/in+docs Del: other reasons-- https://master.php.net/note/delete/95191 Reject -- https://master.php.net/note/reject/95191 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#164082) next »