Merge branch 'master' of https://github.com/EQEmu/Server into lsid

This commit is contained in:
Akkadius
2019-09-01 19:23:56 -05:00
100 changed files with 5252 additions and 4066 deletions
+22 -1
View File
@@ -27,6 +27,8 @@
#else
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#endif
#ifndef va_copy
@@ -119,10 +121,29 @@ std::vector<std::string> SplitString(const std::string &str, char delim) {
while(std::getline(ss, item, delim)) {
ret.push_back(item);
}
return ret;
}
std::string implode(std::string glue, std::vector<std::string> src)
{
if (src.empty()) {
return {};
}
std::ostringstream output;
std::vector<std::string>::iterator src_iter;
for (src_iter = src.begin(); src_iter != src.end(); src_iter++) {
output << *src_iter << glue;
}
std::string final_output = output.str();
final_output.resize (output.str().size () - glue.size());
return final_output;
}
std::string EscapeString(const std::string &s) {
std::string ret;