From c117cd37bb098ba5068eec10c7691925dfcd9c1e Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Wed, 12 Apr 2000 19:33:55 +0000 Subject: [PATCH] ICU-176 utf macros get, prev, back take start parameter; StringChIter is friend X-SVN-Rev: 1115 --- icu4c/source/common/unicode/unistr.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/icu4c/source/common/unicode/unistr.h b/icu4c/source/common/unicode/unistr.h index c2dc3ba9898..96b3434d10b 100644 --- a/icu4c/source/common/unicode/unistr.h +++ b/icu4c/source/common/unicode/unistr.h @@ -1906,6 +1906,7 @@ private: friend class UnicodeStringStreamer; friend class UnicodeConverterCPP; friend U_COMMON_API ostream &operator<<(ostream& stream, const UnicodeString& s); + friend class StringCharacterIterator; /* * The following are all the class fields that are stored @@ -2439,7 +2440,7 @@ UnicodeString::char32At(UTextOffset offset) const { if((uint32_t)offset < (uint32_t)fLength) { UChar32 c; - UTF_GET_CHAR(fArray, offset, fLength, c); + UTF_GET_CHAR(fArray, 0, offset, fLength, c); return c; } else { return kInvalidUChar; @@ -2449,7 +2450,7 @@ UnicodeString::char32At(UTextOffset offset) const inline UTextOffset UnicodeString::getCharStart(UTextOffset offset) { if((uint32_t)offset < (uint32_t)fLength) { - UTF_SET_CHAR_START(fArray, offset); + UTF_SET_CHAR_START(fArray, 0, offset); return offset; } else { return 0; @@ -2459,7 +2460,7 @@ UnicodeString::getCharStart(UTextOffset offset) { inline UTextOffset UnicodeString::getCharLimit(UTextOffset offset) { if((uint32_t)offset < (uint32_t)fLength) { - UTF_SET_CHAR_LIMIT(fArray, offset, fLength); + UTF_SET_CHAR_LIMIT(fArray, 0, offset, fLength); return offset; } else { return fLength;