12 #include "ulcontainers.h"
15 #include "unicode/unistr.h"
19 int ulstrcmp(
const char *a,
const char *b);
20 int ulstrcmpi(
const char *a,
const char *b);
45 #ifdef UL_HAS_IOSTREAMS
46 friend ostream& operator<<(ostream& out,
const ULString& s);
47 friend istream& operator>>(istream& in,
ULString& s);
67 operator const char *();
69 void setAt(uluint32 index, ulchar value);
77 void fromUTF8(
const char *utf8Buffer);
101 void replace(uluint32 index, uluint32 nCharsToReplace,
const ULString& replacementText);
103 void erase(uluint32 start, uluint32 nCharsToErase=1);
112 bool equals(
const ULString& s,
bool ignoreCase,
bool ignoreAccents)
const;
114 uluint32
hash(uluint32 tableSize)
const;
126 void strip(
const char *charactersToRemove = 0);
132 char *conversionBuffer;
133 int conversionBufferCapacity;
134 bool conversionBufferValid;
135 void invalidateConversionBuffer();
137 bool checkIntegrity()
const;
138 enum { MinimumCapacity = 32 };
141 UnicodeString icuString;
142 void initConversionBuffer();
143 #elif defined(UL_USING_COCOA_STRINGS)
144 NSMutableString *nsMutableString;
145 #elif defined(UL_USING_LEGACY_STRINGS)
147 enum { staticBufferSize = 32 };
148 ulchar staticBuffer[staticBufferSize];
153 bool reallocate(
int nCharactersNeeded,
bool copyData);
162 bool operator<(
const ULString& a,
const char *s);
163 bool operator<=(
const ULString& a,
const char *s);
164 bool operator>(
const ULString& a,
const char *s);
165 bool operator>=(
const ULString& a,
const char *s);
166 bool operator==(
const ULString& a,
const char *s);
167 bool operator!=(
const ULString& a,
const char *s);
179 #ifdef UL_HAS_IOSTREAMS
180 ostream& operator<<(ostream& out,
const ULString& s);
181 istream& operator>>(istream& in,
ULString& s);