mirror of
https://github.com/taglib/taglib.git
synced 2025-09-08 06:14:18 -04:00
Update the TCON (genre) frame as we create it so that we don't keep ID3v2.3
formatted data sitting around waiting to be written to 2.4 tags. BUG:132018 git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@578687 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -287,6 +287,14 @@ int String::find(const String &s, int offset) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool String::startsWith(const String &s) const
|
||||
{
|
||||
if(s.length() > length())
|
||||
return false;
|
||||
|
||||
return substr(0, s.length()) == s;
|
||||
}
|
||||
|
||||
String String::substr(uint position, uint n) const
|
||||
{
|
||||
if(n > position + d->data.size())
|
||||
@ -325,6 +333,11 @@ TagLib::uint String::size() const
|
||||
return d->data.size();
|
||||
}
|
||||
|
||||
TagLib::uint String::length() const
|
||||
{
|
||||
return size();
|
||||
}
|
||||
|
||||
bool String::isEmpty() const
|
||||
{
|
||||
return d->data.size() == 0;
|
||||
|
@ -219,6 +219,11 @@ namespace TagLib {
|
||||
*/
|
||||
int find(const String &s, int offset = 0) const;
|
||||
|
||||
/*!
|
||||
* Returns true if the strings starts with the substring \a s.
|
||||
*/
|
||||
bool startsWith(const String &s) const;
|
||||
|
||||
/*!
|
||||
* Extract a substring from this string starting at \a position and
|
||||
* continuing for \a n characters.
|
||||
@ -243,6 +248,11 @@ namespace TagLib {
|
||||
*/
|
||||
uint size() const;
|
||||
|
||||
/*!
|
||||
* Returns the length of the string. Equivalent to size().
|
||||
*/
|
||||
uint length() const;
|
||||
|
||||
/*!
|
||||
* Returns true if the string is empty.
|
||||
*
|
||||
|
Reference in New Issue
Block a user