shadPS4/src/common/string_util.cpp

21 lines
430 B
C++
Raw Normal View History

#include <algorithm>
#include <sstream>
#include <string>
2023-11-05 12:41:10 +01:00
#include "common/string_util.h"
namespace Common {
std::vector<std::string> SplitString(const std::string &str, char delimiter) {
std::istringstream iss(str);
std::vector<std::string> output(1);
while (std::getline(iss, *output.rbegin(), delimiter)) {
output.emplace_back();
}
output.pop_back();
return output;
}
} // namespace Common