]> granicus.if.org Git - taglib/commitdiff
Funny that there managed to be no operator!= for String for so long.
authorScott Wheeler <scott@directededge.com>
Sun, 1 Jan 2012 15:01:18 +0000 (16:01 +0100)
committerScott Wheeler <scott@directededge.com>
Sun, 1 Jan 2012 15:01:18 +0000 (16:01 +0100)
taglib/toolkit/tstring.cpp
taglib/toolkit/tstring.h

index a9a1ee43a405098f7906480e6ad8ffaa0e9fe5cd..d85305d2a7467506ff9fa1f097996d4a9b87f801 100644 (file)
@@ -567,6 +567,11 @@ bool String::operator==(const String &s) const
   return d == s.d || d->data == s.d->data;
 }
 
+bool String::operator!=(const String &s) const
+{
+  return !operator==(s);
+}
+
 String &String::operator+=(const String &s)
 {
   detach();
index 10b9f66a61c3f8ae34fc13fd7e7ddd7d4fb42acd..2c782e1288416d777a004d6d0c7dae0792c7f5e6 100644 (file)
@@ -357,6 +357,12 @@ namespace TagLib {
      */
     bool operator==(const String &s) const;
 
+    /*!
+     * Compares each character of the String with each character of \a s and
+     * returns false if the strings match.
+     */
+    bool operator!=(const String &s) const;
+
     /*!
      * Appends \a s to the end of the String.
      */