#include "unicode/chariter.h"
#include "unicode/ustring.h"
#include "unicode/unistr.h"
#include "unicode/chariter.h"
#include "unicode/ustring.h"
#include "unicode/unistr.h"
#include "unicode/uchriter.h"
#include "unicode/uiter.h"
#include "unicode/putil.h"
#include "unicode/uchriter.h"
#include "unicode/uiter.h"
#include "unicode/putil.h"
- UTF_FWD_N(text, pos, end, delta);
+ U16_FWD_N(text, pos, end, delta);
- UTF_FWD_N(text, pos, end, delta);
+ U16_FWD_N(text, pos, end, delta);
- UTF_BACK_N(text, begin, pos, -delta);
+ U16_BACK_N(text, begin, pos, -delta);
- UTF_BACK_N(text, begin, pos, -delta);
+ U16_BACK_N(text, begin, pos, -delta);
c=iter.first32PostInc();
if(c != text.char32At(i))
errln("first32PostInc failed. Expected->%X Got->%X", text.char32At(i), c);
c=iter.first32PostInc();
if(c != text.char32At(i))
errln("first32PostInc failed. Expected->%X Got->%X", text.char32At(i), c);
if(c != text.char32At(i))
errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
if(c != text.char32At(i))
errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
if(iter.getIndex() != i)
errln("getIndex() aftr next32PostInc() isn't working right");
if(iter.current32() != text.char32At(i))
if(iter.getIndex() != i)
errln("getIndex() aftr next32PostInc() isn't working right");
if(iter.current32() != text.char32At(i))
public:
// public default constructor, to get coverage of CharacterIterator()
SubCharIter() : CharacterIterator() {
public:
// public default constructor, to get coverage of CharacterIterator()
SubCharIter() : CharacterIterator() {
// useful stuff, mostly dummy but testing coverage and subclassability
virtual UChar nextPostInc() {
// useful stuff, mostly dummy but testing coverage and subclassability
virtual UChar nextPostInc() {
- U16_NEXT(s, pos, LENGTHOF(s), c);
+ U16_NEXT(s, pos, UPRV_LENGTHOF(s), c);
- U16_NEXT(s, pos, LENGTHOF(s), c);
+ U16_NEXT(s, pos, UPRV_LENGTHOF(s), c);
- U16_GET(s, 0, pos, LENGTHOF(s), c);
+ U16_GET(s, 0, pos, UPRV_LENGTHOF(s), c);
- U16_GET(s, 0, pos, LENGTHOF(s), c);
+ U16_GET(s, 0, pos, UPRV_LENGTHOF(s), c);
- if(pos<LENGTHOF(s)) {
- U16_FWD_1(s, pos, LENGTHOF(s));
+ if(pos<UPRV_LENGTHOF(s)) {
+ U16_FWD_1(s, pos, UPRV_LENGTHOF(s));
- U16_NEXT(s, i, LENGTHOF(s), c);
+ U16_NEXT(s, i, UPRV_LENGTHOF(s), c);
}
// dummy implementations of other pure virtual base class functions
virtual UBool operator==(const ForwardCharacterIterator &that) const {
return
this==&that ||
}
// dummy implementations of other pure virtual base class functions
virtual UBool operator==(const ForwardCharacterIterator &that) const {
return
this==&that ||