26 #ifndef TAGLIB_STRING_H 27 #define TAGLIB_STRING_H 45 #if defined(QT_VERSION) && (QT_VERSION >= 0x040000) 46 #define QStringToTString(s) TagLib::String(s.toUtf8().data(), TagLib::String::UTF8) 48 #define QStringToTString(s) TagLib::String(s.utf8().data(), TagLib::String::UTF8) 61 #define TStringToQString(s) QString::fromUtf8(s.toCString(true)) 88 #ifndef DO_NOT_DOCUMENT 89 typedef TagLib::wstring::iterator Iterator;
90 typedef TagLib::wstring::const_iterator ConstIterator;
139 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);
178 String(
const char *s, Type t = Latin1);
196 std::string to8Bit(
bool unicode =
false)
const;
225 const char *toCString(
bool unicode =
false)
const;
243 const wchar_t *toCWString()
const;
253 ConstIterator begin()
const;
265 ConstIterator end()
const;
271 int find(
const String &s,
int offset = 0)
const;
278 int rfind(
const String &s,
int offset = -1)
const;
288 bool startsWith(
const String &s)
const;
294 String substr(
unsigned int position,
unsigned int n = 0xffffffff)
const;
317 unsigned int size()
const;
322 unsigned int length()
const;
329 bool isEmpty()
const;
373 int toInt(
bool *ok)
const;
378 String stripWhiteSpace()
const;
383 bool isLatin1()
const;
388 bool isAscii()
const;
393 static String number(
int n);
398 wchar_t &operator[](
int i);
403 const wchar_t &operator[](
int i)
const;
409 bool operator==(
const String &s)
const;
415 bool operator!=(
const String &s)
const;
421 bool operator==(
const char *s)
const;
427 bool operator!=(
const char *s)
const;
433 bool operator==(
const wchar_t *s)
const;
439 bool operator!=(
const wchar_t *s)
const;
449 String &operator+=(
const wchar_t* s);
454 String &operator+=(
const char* s);
459 String &operator+=(
wchar_t c);
464 String &operator+=(
char c);
475 String &operator=(
const std::string &s);
485 String &operator=(
const wchar_t *s);
490 String &operator=(
char c);
495 String &operator=(
wchar_t c);
500 String &operator=(
const char *s);
517 bool operator<(
const String &s)
const;
std::basic_string< wchar_t > wstring
Definition: taglib.h:86
TAGLIB_EXPORT std::ostream & operator<<(std::ostream &s, const TagLib::ByteVector &v)
A wide string class suitable for unicode.
Definition: tstring.h:84
TAGLIB_EXPORT const TagLib::String operator+(const TagLib::String &s1, const TagLib::String &s2)
A byte vector.
Definition: tbytevector.h:45
#define TAGLIB_DEPRECATED
Definition: taglib.h:54
A list of strings.
Definition: tstringlist.h:45
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
Type
Definition: tstring.h:97
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41