mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-06-17 03:50:03 +02:00
string: typedef std::vector<std::string> to strlist_t
This commit is contained in:
parent
372bb3c81e
commit
c91d8ac33c
2 changed files with 8 additions and 6 deletions
|
|
@ -25,16 +25,16 @@
|
|||
#include <cctype>
|
||||
#include "string.h"
|
||||
|
||||
std::vector<std::string> strsplitwords(const std::string& str, const std::string& delim) {
|
||||
strlist_t strsplitwords(const std::string& str, const std::string& delim) {
|
||||
|
||||
std::vector<std::string> words = strsplit(str, delim);
|
||||
strlist_t 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) {
|
||||
strlist_t strsplit(const std::string& str, const std::string& delim) {
|
||||
|
||||
std::vector<std::string> r;
|
||||
strlist_t r;
|
||||
size_t s = 0, e = 0, dlen = delim.length();
|
||||
|
||||
while((e = str.find(delim, s)) != std::string::npos) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue