diff options
-rw-r--r-- | FoundationEx/Text.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/FoundationEx/Text.h b/FoundationEx/Text.h index 73e1242..df5edae 100644 --- a/FoundationEx/Text.h +++ b/FoundationEx/Text.h @@ -14,6 +14,8 @@ #ifndef Text_h #define Text_h +#include <ostream> + #include <string.h> #include <windows.h> #include "ThreadSync.h" @@ -64,6 +66,8 @@ public: Text(const Text& s); ~Text(); + friend std::ostream& operator<<(std::ostream& out, const Text& text); + // case sensitivity bool isSensitive() const; void setSensitive(bool s); @@ -148,6 +152,8 @@ inline int Text::compare(const Text& s) const // +-------------------------------------------------------------------+ +inline std::ostream& operator<<(std::ostream& out, const Text& text) { + out << text.data(); return out; } inline int operator==(const Text& l, const Text& r) { return (l.length() == r.length()) && (l.compare(r) == 0); } inline int operator!=(const Text& l, const Text& r) { return l.compare(r) != 0; } |