Erwan
- Updated fix for Dragon Broodmother
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#include "../include/config.h"
|
||||
#include "../include/utils.h"
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
using std::vector;
|
||||
|
||||
int randValuesCursor = -1;
|
||||
@@ -201,3 +204,18 @@ string& rtrim(string &str)
|
||||
str.resize(str.find_last_not_of(" \t") + 1);
|
||||
return str;
|
||||
}
|
||||
|
||||
std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) {
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
while(std::getline(ss, item, delim)) {
|
||||
elems.push_back(item);
|
||||
}
|
||||
return elems;
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::string> split(const std::string &s, char delim) {
|
||||
std::vector<std::string> elems;
|
||||
return split(s, delim, elems);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user