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;
127 static Type ID3Type(
int i);
128 static Type ID3WType(Type type);
129 static Type ID3RealType(Type type);
149 String(
const std::string &s, Type t = Latin1);
159 String(
const wchar_t *s, Type t = UTF16BE);
167 String(
char c, Type t = Latin1);
172 String(
wchar_t c, Type t = Latin1);
181 String(
const char *s, Type t = Latin1);
201 std::string to8Bit(
bool unicode =
false)
const;
223 const char *toCString(
bool unicode =
false)
const;
233 ConstIterator begin()
const;
245 ConstIterator end()
const;
251 int find(
const String &s,
int offset = 0)
const;
258 int rfind(
const String &s,
int offset = -1)
const;
268 bool startsWith(
const String &s)
const;
304 bool isEmpty()
const;
338 int toInt(
bool *ok)
const;
343 String stripWhiteSpace()
const;
348 bool isLatin1()
const;
353 bool isAscii()
const;
358 static String number(
int n);
363 wchar &operator[](
int i);
368 const wchar &operator[](
int i)
const;
374 bool operator==(
const String &s)
const;
380 bool operator!=(
const String &s)
const;
390 String &operator+=(
const wchar_t* s);
395 String &operator+=(
const char* s);
400 String &operator+=(
wchar_t c);
405 String &operator+=(
char c);
416 String &operator=(
const std::string &s);
426 String &operator=(
const wchar_t *s);
431 String &operator=(
char c);
436 String &operator=(
wchar_t c);
441 String &operator=(
const char *s);
453 bool operator<(
const String &s)
const;
475 void prepare(
Type t);