summaryrefslogtreecommitdiff
path: root/src/Fl_String.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_String.cxx')
-rw-r--r--src/Fl_String.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Fl_String.cxx b/src/Fl_String.cxx
index 8fd8e5f51..60d50ef99 100644
--- a/src/Fl_String.cxx
+++ b/src/Fl_String.cxx
@@ -646,6 +646,19 @@ bool operator==(const Fl_String &lhs, const Fl_String &rhs) {
}
/**
+ Compare two strings for inequality.
+ \param[in] lhs first string
+ \param[in] rhs second string
+ \return true if strings differ in size or content
+ */
+bool operator!=(const Fl_String &lhs, const Fl_String &rhs) {
+ if (lhs.size() != rhs.size()) return true;
+ int sz = lhs.size(); // same size for both
+ if (memcmp(lhs.data(), rhs.data(), sz) != 0) return true;
+ return false;
+}
+
+/**
\}
\endcond
*/