#include "inspircd.h"
-#include "hashcomp.h"
/******************************************************
*
return n;
}
-irc::stringjoiner::stringjoiner(const std::vector<std::string>& sequence)
+std::string irc::stringjoiner(const std::vector<std::string>& sequence, char separator)
{
+ std::string joined;
if (sequence.empty())
- return; // nothing to do here
+ return joined; // nothing to do here
for (std::vector<std::string>::const_iterator i = sequence.begin(); i != sequence.end(); ++i)
- joined.append(*i).push_back(' ');
+ joined.append(*i).push_back(separator);
joined.erase(joined.end()-1);
+ return joined;
}
irc::portparser::portparser(const std::string &source, bool allow_overlapped)