> A variation of the proposal might be ...

I like it. I vote for:

  Add a new optional parameter on the end - called $next - that
  is a reference that will receive the offset just past the 
  end of the returned string.

The caller can use the same variable for $start and $next if they don't want
to have to manually assign the value in their own code.

I will add the three options for the meaning of 'start' as well with the
default being 'byte'. The returned $next value will respect the value of
that option.
 
If no one objects I'll put that in.

> The right solution (to my mind) is to have some meta data maintained with
> strings and store position and other info about the strings to improve
> performance without involving programmers and letting people program
> strings without caring about encoding or architecture. That is an
> opportunity for php 6.

Sounds like a break iterator with a bit of extra info to support multiple
encodings. Or perhaps you mean to wrap all string operations?

=Ed



-- 
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to