1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 20:49:56 +00:00
openmw-tes3mp/apps/openmw-mp/Utils.cpp
Koncord c353e18645 [General] Move Utils from server to components
Rewrite CRC32 functions to the Boost equivalent
2017-03-04 13:08:22 +08:00

26 lines
No EOL
498 B
C++

//
// 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;
}