26 #ifndef TAGLIB_STRING_H
27 #define TAGLIB_STRING_H
44 #define QStringToTString(s) TagLib::String(s.utf8().data(), TagLib::String::UTF8)
55 #define TStringToQString(s) QString::fromUtf8(s.toCString(true))
82 #ifndef DO_NOT_DOCUMENT
83 typedef std::basic_string<wchar>::iterator Iterator;
84 typedef std::basic_string<wchar>::const_iterator ConstIterator;
133 String(
const std::string &s, Type t = Latin1);
143 String(
const wchar_t *s, Type t = WCharByteOrder);
151 String(
char c, Type t = Latin1);
156 String(
wchar_t c, Type t = Latin1);
165 String(
const char *s, Type t = Latin1);
186 std::string to8Bit(
bool unicode =
false)
const;
214 const char *toCString(
bool unicode =
false)
const;
232 const wchar_t *toCWString()
const;
242 ConstIterator begin()
const;
254 ConstIterator end()
const;
260 int find(
const String &s,
int offset = 0)
const;
267 int rfind(
const String &s,
int offset = -1)
const;
277 bool startsWith(
const String &s)
const;
313 bool isEmpty()
const;
347 int toInt(
bool *ok)
const;
352 String stripWhiteSpace()
const;
357 bool isLatin1()
const;
362 bool isAscii()
const;
367 static String number(
int n);
372 wchar &operator[](
int i);
377 const wchar &operator[](
int i)
const;
383 bool operator==(
const String &s)
const;
389 bool operator!=(
const String &s)
const;
399 String &operator+=(
const wchar_t* s);
404 String &operator+=(
const char* s);
409 String &operator+=(
wchar_t c);
414 String &operator+=(
char c);
425 String &operator=(
const std::string &s);
435 String &operator=(
const wchar_t *s);
440 String &operator=(
char c);
445 String &operator=(
wchar_t c);
450 String &operator=(
const char *s);
462 bool operator<(
const String &s)
const;
482 void copyFromLatin1(
const char *s,
size_t length);
488 void copyFromUTF8(
const char *s,
size_t length);
494 void copyFromUTF16(
const wchar_t *s,
size_t length,
Type t);
500 void copyFromUTF16(
const char *s,
size_t length,
Type t);
507 static const Type WCharByteOrder;