summaryrefslogtreecommitdiff
path: root/src/hashcomp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r--src/hashcomp.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 2acd59f91..0908e41b5 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -354,3 +354,30 @@ int irc::modestacker::GetStackedLine(std::deque<std::string> &result)
return n;
}
+
+irc::stringjoiner::stringjoiner(const std::string &seperator, const std::vector<std::string> &sequence, int begin, int end)
+{
+ for (int v = begin; v < end; v++)
+ joined.append(sequence[v]).append(seperator);
+ joined.append(sequence[end]);
+}
+
+irc::stringjoiner::stringjoiner(const std::string &seperator, const std::deque<std::string> &sequence, int begin, int end)
+{
+ for (int v = begin; v < end; v++)
+ joined.append(sequence[v]).append(seperator);
+ joined.append(sequence[end]);
+}
+
+irc::stringjoiner::stringjoiner(const std::string &seperator, const char** sequence, int begin, int end)
+{
+ for (int v = begin; v < end; v++)
+ joined.append(sequence[v]).append(seperator);
+ joined.append(sequence[end]);
+}
+
+std::string& irc::stringjoiner::GetJoined()
+{
+ return joined;
+}
+