Peter Gibbs <[EMAIL PROTECTED]> wrote: > I would prefer this to be done via an iterator, as it would also solve > the skip_backward problems with DBCS encoding. Something like:
There was a discussion, that current string iterators are wrong. They should take a position argument (and start of string) instead the pointer... > typedef struct string_iterator_t { > String *str; > UINTVAL bytepos; > UINTVAL charpos; > UINTVAL (*decode_and_advance)(struct string_iterator_t *i); > } string_iterator; ... which is done here. > Does anybody think this is worth implementing? Yes. Its a nice speed up and a clean interface. > Peter Gibbs leo