1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-17 03:50:03 +02:00

string: adding strsplitwords()

This commit is contained in:
Henrik Hautakoski 2020-01-09 06:45:46 +01:00
parent 8ae7a24e27
commit 9354154ddd
2 changed files with 9 additions and 0 deletions

View file

@ -25,6 +25,13 @@
#include <cctype>
#include "string.h"
std::vector<std::string> strsplitwords(const std::string& str, const std::string& delim) {
std::vector<std::string> words = strsplit(str, delim);
std::for_each(words.begin(), words.end(), trim);
return words;
}
std::vector<std::string> strsplit(const std::string& str, const std::string& delim) {
std::vector<std::string> r;