errln("setIndex32() isn't working right");
if (c != CharacterIterator::DONE) {
c = iter.next32();
- i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i+2 : i+1;
+ i += U16_LENGTH(c);
}
} while (c != CharacterIterator::DONE);
if(iter.hasNext() == TRUE)
errln("getIndex() isn't working right");
if (c != CharacterIterator::DONE) {
c = iter.previous32();
- i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i-2 : i-1;
+ i -= U16_LENGTH(c);
}
} while (c != CharacterIterator::DONE);
if(iter.hasPrevious() == TRUE)
if(c != text.char32At(i))
errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
- i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i+2 : i+1;
+ i += U16_LENGTH(c);
if(iter.getIndex() != i)
errln("getIndex() aftr next32PostInc() isn't working right");
if(iter.current32() != text.char32At(i))
if (c != CharacterIterator::DONE) {
c = iter.next32();
- i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i+2 : i+1;
+ i += U16_LENGTH(c);
}
} while (c != CharacterIterator::DONE);
c=iter.next32();
if (c != CharacterIterator::DONE) {
c = iter.previous32();
- i=UTF16_NEED_MULTIPLE_UCHAR(c) ? i-2 : i-1;
+ i -= U16_LENGTH(c);
}
} while (c != CharacterIterator::DONE);