|
From: Andy H. <and...@gm...> - 2005-10-14 23:36:31
|
On 10/14/05, Deborah Goldsmith <gol...@ap...> wrote: > What I want to do is scan forward from an index and find > the first character that is not in a particular Unicode set. Since there's no existing function that does exactly what you're looking for, it sounds like the thing to do is just use the obvious two-line loop, and worry about it later if it turns out to be too slow. I doubt that there is any huge gain to be had beyond the straight forward loop in any event. UText will be pretty quick at getting characters. If the range of characters handled by a dictionary typically covers a single script, UnicodeSet's range-list binary search should degenerate to something short. All that's left is the per-character function call overhead into UnicodeSet and the per-character range checking on UText. On 10/14/05, Deborah Goldsmith <gol...@ap...> wrote: > I don't think that would work for this application, since it's for > text break. What I want to do is scan forward from an index and find > the first character that is not in a particular Unicode set. Since > it's inside text break, the text is represented by a > CharacterIterator (and in the future I assume UText). > |