frohzinn's picture
download
raw
863 Bytes
#include "simple-tokenize.h"
std::vector<std::string> simple_tokenize(const std::string & input) {
std::vector<std::string> result;
std::string current;
for (size_t i = 0; i < input.size(); i++) {
switch (input[i]) {
case ' ':
case '\n':
case '\t':
case '{':
case '}':
case ',':
case '[':
case '"':
case ']':
case '.':
case '<':
case '>':
case '=':
case '/':
if (!current.empty()) {
result.push_back(current);
current.clear();
}
default:;
}
current += input[i];
}
if (!current.empty()) {
result.push_back(current);
}
return result;
}

Xet Storage Details

Size:
863 Bytes
·
Xet hash:
9c539394ebf25ccd5c1618e6ea6b4e43ac63b7302e50761a64fa2d154a09dca2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.