summaryrefslogtreecommitdiffhomepage
path: root/FoundationEx
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-03-24 22:17:29 +0100
committerAki <please@ignore.pl>2022-03-24 22:17:29 +0100
commit153f8032eebd9a61d525b0532b54b68e91625492 (patch)
tree8bc5056095553690428735d027e6caa679107635 /FoundationEx
parent6b2a17a2ccb1a0d45489208f7f23b9d6a65b110d (diff)
downloadstarshatter-153f8032eebd9a61d525b0532b54b68e91625492.zip
starshatter-153f8032eebd9a61d525b0532b54b68e91625492.tar.gz
starshatter-153f8032eebd9a61d525b0532b54b68e91625492.tar.bz2
Added ostream output for Text
Diffstat (limited to 'FoundationEx')
-rw-r--r--FoundationEx/Text.h6
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; }