diff --git a/src/main.cpp b/src/main.cpp index 3c67bbc..e6ea752 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,7 +69,8 @@ void cmd_search(int argc, char **argv) { words.insert(words.end(), list.begin(), list.end()); } } else { - words = strsplitwords(strtolower(base58_strip(search))); + words = strsplitwords(strtolower(search)); + base58_strip(words); } if (argc > 1) { diff --git a/src/string.cpp b/src/string.cpp index d5af6f8..a90388b 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -94,6 +94,12 @@ std::string& base58_strip(std::string &str) { return str; } +strlist_t& base58_strip(strlist_t& list) { + + std::transform(list.begin(), list.end(), list.begin(), [](std::string& str){ return base58_strip(str); }); + return list; +} + static bool is_l33t(char ch, char& r) { // '1', '2', '3', '4', '5', '6', '7', '8', '9' diff --git a/src/string.h b/src/string.h index 98c1c8a..d006579 100644 --- a/src/string.h +++ b/src/string.h @@ -42,6 +42,7 @@ std::string& ltrim(std::string& str); std::string& trim(std::string& str); std::string& base58_strip(std::string &str); +strlist_t& base58_strip(strlist_t& list); strlist_t l33twords(const std::string& str);