xo-object2: + string comparison operators

This commit is contained in:
Roland Conybeare 2026-01-15 17:28:54 -05:00
commit fac95836fc
2 changed files with 67 additions and 0 deletions

View file

@ -250,6 +250,26 @@ namespace xo {
return DString::compare(lhs, rhs) == 0;
}
inline bool operator!=(const DString & lhs, const DString & rhs) {
return DString::compare(lhs, rhs) != 0;
}
inline bool operator<(const DString & lhs, const DString & rhs) {
return DString::compare(lhs, rhs) < 0;
}
inline bool operator<=(const DString & lhs, const DString & rhs) {
return DString::compare(lhs, rhs) <= 0;
}
inline bool operator>(const DString & lhs, const DString & rhs) {
return DString::compare(lhs, rhs) > 0;
}
inline bool operator>=(const DString & lhs, const DString & rhs) {
return DString::compare(lhs, rhs) >= 0;
}
} /*namespace scm*/
} /*namespace xo*/