From: special Date: Thu, 22 Feb 2007 11:50:19 +0000 (+0000) Subject: Added sepstream::GetRemaining() X-Git-Tag: v2.0.23~5782 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=37976713821bf13dfe67c7b5d0d43c59affd12c7;p=user%2Fhenk%2Fcode%2Finspircd.git Added sepstream::GetRemaining() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6608 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/include/hashcomp.h b/include/hashcomp.h index 445c4c4ea..b7f8d9538 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -263,6 +263,11 @@ namespace irc */ virtual const std::string GetToken(); + /** Fetch the entire remaining stream, without tokenizing + * @return The remaining part of the stream + */ + virtual const std::string GetRemaining(); + /** Returns true if the end of the stream has been reached * @return True if the end of the stream has been reached, otherwise false */ diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index f8d131675..060d78fe2 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -261,6 +261,11 @@ const std::string irc::sepstream::GetToken() return ""; } +const std::string irc::sepstream::GetRemaining() +{ + return std::string(n, tokens.end()); +} + bool irc::sepstream::StreamEnd() { return ((n + 1) == tokens.end());