1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 23:19:56 +00:00
openmw-tes3mp/apps/openmw-mp/Utils.cpp

26 lines
498 B
C++
Raw Normal View History

//
// Created by koncord on 04.03.17.
//
#include "Utils.hpp"
using namespace std;
const vector<string> Utils::split(const string &str, int delimiter)
{
string buffer;
vector<string> result;
for (auto symb:str)
if (symb != delimiter)
buffer += symb;
else if (!buffer.empty())
{
result.push_back(move(buffer));
buffer.clear();
}
if (!buffer.empty())
result.push_back(move(buffer));
return result;
}