Rob,

> I have a need to iterate through a multibyte string to process the string 
> character by character.

> -- Is using mb_substr($str, $i, 1) the only way to get this to work in php5?  
> That's my question.
> 
> It seems like it's going to be many times slower according to some of the 
> comments I've seen on the multibyte functions in the php manual.

This might be a bit quicker:

$str = "string with utf-8 chars åèö";
$t = preg_split('//u',$str,-1,PREG_SPLIT_NO_EMPTY);
var_dump($t);

Dan
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Reply via email to