From 9cf448a332799a138dad0acb5b2878535770571d Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 26 Jul 2018 21:23:45 +0100 Subject: Replace irc::stringjoiner with a generic stdalgo::string::join. This can also be used with different types of collection containing values which are not a string. --- src/hashcomp.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/hashcomp.cpp') diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 08ce154e8..2288a227e 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -279,18 +279,6 @@ bool irc::sepstream::StreamEnd() return this->pos > this->tokens.length(); } -std::string irc::stringjoiner(const std::vector& sequence, char separator) -{ - std::string joined; - if (sequence.empty()) - return joined; // nothing to do here - - for (std::vector::const_iterator i = sequence.begin(); i != sequence.end(); ++i) - joined.append(*i).push_back(separator); - joined.erase(joined.end()-1); - return joined; -} - irc::portparser::portparser(const std::string &source, bool allow_overlapped) : sep(source), in_range(0), range_begin(0), range_end(0), overlapped(allow_overlapped) { -- cgit v1.3.1-10-gc9f91