From cf4bc2f14204eee3fc74ecc1c872dc6d47555bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sun, 4 Dec 2016 13:58:25 +0100 Subject: [PATCH] added a get_content() method, which excludes command byte & term byte --- chat_messages.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chat_messages.hpp b/chat_messages.hpp index cb2b03e..4ebe687 100644 --- a/chat_messages.hpp +++ b/chat_messages.hpp @@ -33,6 +33,9 @@ namespace chat std::string get() const { return byte(_header) + _content + byte(message::TERM); } + + std::string get_content() const + { return _content; } }; std::ostream& operator<<(std::ostream& os, const chat_message& msg)