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))
80 #ifndef DO_NOT_DOCUMENT
81 typedef std::basic_string<wchar>::iterator Iterator;
82 typedef std::basic_string<wchar>::const_iterator ConstIterator;
125 static Type ID3Type(
int i);
126 static Type ID3WType(Type type);
127 static Type ID3RealType(Type type);
147 String(
const std::string &s, Type t = Latin1);
157 String(
const wchar_t *s, Type t = UTF16BE);
165 String(
char c, Type t = Latin1);
170 String(
wchar_t c, Type t = Latin1);
179 String(
const char *s, Type t = Latin1);
199 std::string to8Bit(
bool unicode =
false)
const;
221 const char *toCString(
bool unicode =
false)
const;
231 ConstIterator begin()
const;
243 ConstIterator end()
const;
249 int find(
const String &s,
int offset = 0)
const;
256 int rfind(
const String &s,
int offset = -1)
const;
261 bool startsWith(
const String &s)
const;
297 bool isEmpty()
const;
331 int toInt(
bool *ok)
const;
336 String stripWhiteSpace()
const;
341 bool isLatin1()
const;
346 bool isAscii()
const;
351 static String number(
int n);
356 wchar &operator[](
int i);
361 const wchar &operator[](
int i)
const;
367 bool operator==(
const String &s)
const;
377 String &operator+=(
const wchar_t* s);
382 String &operator+=(
const char* s);
387 String &operator+=(
wchar_t c);
392 String &operator+=(
char c);
403 String &operator=(
const std::string &s);
413 String &operator=(
const wchar_t *s);
418 String &operator=(
char c);
423 String &operator=(
wchar_t c);
428 String &operator=(
const char *s);
440 bool operator<(
const String &s)
const;
462 void prepare(
Type t);