-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathutil.cpp
More file actions
29 lines (22 loc) · 700 Bytes
/
util.cpp
File metadata and controls
29 lines (22 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
GPU plot generator for Burst coin.
Author: Cryo
Bitcoin: 138gMBhCrNkbaiTCmUhP9HLU9xwn5QKZgD
Burst: BURST-YA29-QCEW-QXC3-BKXDL
Based on the code of the official miner and dcct's plotgen.
*/
#include "util.h"
namespace cryo {
namespace util {
std::vector<std::string> split(const std::string& p_string, const std::string& p_separator) {
std::vector<std::string> parts;
std::size_t offset = 0;
std::size_t index;
while((index = p_string.find(p_separator, offset)) != std::string::npos) {
parts.push_back(p_string.substr(offset, index - offset));
offset = index + p_separator.length();
}
parts.push_back(p_string.substr(offset));
return parts;
}
}}