From baba04991f7e08fbd3c0b1314c2e52ef205a93a4 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 15 Jan 2020 12:56:40 +0100 Subject: [PATCH] string: adding base58_strip() for strlist_t --- src/string.cpp | 6 ++++++ src/string.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/string.cpp b/src/string.cpp index a8c4e99..91b0960 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -78,3 +78,9 @@ std::string& base58_strip(std::string &str) { ), str.end()); 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; +} diff --git a/src/string.h b/src/string.h index 38c0440..e364fed 100644 --- a/src/string.h +++ b/src/string.h @@ -40,5 +40,6 @@ 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); #endif /* STRING_H */