14 #include <boost/functional/hash.hpp>
15 #include <boost/serialization/split_free.hpp>
96 template <
typename QStringType,
typename QCoreApp>
100 0, QCoreApp::UnicodeUTF8);
104 template <
typename QStringType>
107 return fromUtf16(qstr.utf16(),qstr.length());
120 inline void setFromUtf8(
const unsigned char* utf8,
int len = -1);
129 inline void setFromUtf16(
const unsigned short* utf16,
int len = -1);
133 inline void setFromUtf32(
const unsigned int* utf32,
int len = -1);
141 inline void setFromAscii(
const char* ascii,
int len = -1);
144 template <
typename QStringType>
154 inline void toAscii(std::string& str)
const;
155 inline std::string
toAscii()
const { std::string temp;
toAscii(temp);
return temp;}
159 inline void toLatin1(std::string& str)
const;
162 inline void toUtf8(std::string& str)
const;
163 inline std::string
toUtf8()
const { std::string temp;
toUtf8(temp);
return temp;}
168 template <
typename QStringType>
175 template <
typename QStringType>
198 inline size_t length()
const;
230 inline void resize(
int size );
245 inline explicit DtUnicode(
const unsigned short* utf16,
int len = -1);
248 inline explicit DtUnicode(
const unsigned int* utf32,
int len = -1);
251 inline explicit DtUnicode(
const std::string& ascii);
267 inline void resize(
size_t newSize);
280 inline size_t size()
const;
289 inline bool unique()
const;
292 inline bool empty()
const;
316 size_t seed = 2166136261U;
318 size_t last = val.
length();
319 size_t stride = 1 + last / 10;
325 for(; first < last ; first += stride )
327 seed = 16777619U * seed ^ (size_t)val.
codeUnits()[first];