return d->CString;
}
+String::Iterator String::begin()
+{
+ return d->data.begin();
+}
+
+String::ConstIterator String::begin() const
+{
+ return d->data.begin();
+}
+
+String::Iterator String::end()
+{
+ return d->data.end();
+}
+
+String::ConstIterator String::end() const
+{
+ return d->data.end();
+}
+
int String::find(const String &s, int offset) const
{
wstring::size_type position = d->data.find(s.d->data, offset);
return s;
}
+TagLib::wchar &String::operator[](int i)
+{
+ return d->data[i];
+}
+
+const TagLib::wchar &String::operator[](int i) const
+{
+ return d->data[i];
+}
+
bool String::operator==(const String &s) const
{
return d == s.d || d->data == s.d->data;
class String
{
public:
+
+#ifndef DO_NOT_DOCUMENT
+ typedef std::basic_string<wchar>::iterator Iterator;
+ typedef std::basic_string<wchar>::const_iterator ConstIterator;
+#endif
+
/**
* The four types of string encodings supported by the ID3v2 specification.
* ID3v1 is assumed to be Latin1 and Ogg Vorbis comments use UTF8.
*/
const char *toCString(bool unicode = false) const;
+ /*!
+ * Returns an iterator pointing to the beginning of the string.
+ */
+ Iterator begin();
+
+ /*!
+ * Returns a const iterator pointing to the beginning of the string.
+ */
+ ConstIterator begin() const;
+
+ /*!
+ * Returns an iterator pointing to the end of the string (the position
+ * after the last character).
+ */
+ Iterator end();
+
+ /*!
+ * Returns a const iterator pointing to the end of the string (the position
+ * after the last character).
+ */
+ ConstIterator end() const;
+
/*!
* Finds the first occurance of pattern \a s in this string starting from
* \a offset. If the pattern is not found, -1 is returned.
*/
static String number(int n);
+ /*!
+ * Returns a reference to the character at position \a i.
+ */
+ wchar &operator[](int i);
+
+ /*!
+ * Returns a const reference to the character at position \a i.
+ */
+ const wchar &operator[](int i) const;
+
/*!
* Compares each character of the String with each character of \a s and
* returns true if the strings match.