* @return True if the end of the stream has been reached, otherwise false
*/
bool StreamEnd();
+
+ /** Returns true if the specified value exists in the stream
+ * @param value The value to search for
+ * @return True if the value was found, False otherwise
+ */
+ bool Contains(const std::string& value);
};
/** A derived form of sepstream, which seperates on commas
public:
/** Create a tokenstream and fill it with the provided data. */
- tokenstream(const std::string& msg, size_t start = 0);
+ tokenstream(const std::string& msg, size_t start = 0, size_t end = std::string::npos);
+
+ /** Retrieves the underlying message. */
+ std::string& GetMessage() { return message; }
- /** Retrieve the next <middle> token in the token stream.
+ /** Retrieve the next \<middle> token in the token stream.
* @param token The next token available, or an empty string if none remain.
* @return True if tokens are left to be read, false if the last token was just retrieved.
*/
bool GetMiddle(std::string& token);
- /** Retrieve the next <trailing> token in the token stream.
+ /** Retrieve the next \<trailing> token in the token stream.
* @param token The next token available, or an empty string if none remain.
* @return True if tokens are left to be read, false if the last token was just retrieved.
*/