diff options
-rw-r--r-- | src/lib/utils/parsing.cpp | 8 | ||||
-rw-r--r-- | src/lib/utils/parsing.h | 14 |
2 files changed, 1 insertions, 21 deletions
diff --git a/src/lib/utils/parsing.cpp b/src/lib/utils/parsing.cpp index 13cb26f24..7d6d9c6d6 100644 --- a/src/lib/utils/parsing.cpp +++ b/src/lib/utils/parsing.cpp @@ -116,19 +116,13 @@ std::vector<std::string> parse_algorithm_name(const std::string& namex) std::vector<std::string> split_on(const std::string& str, char delim) { - return split_on_pred(str, [delim](char c) { return c == delim; }); - } - -std::vector<std::string> split_on_pred(const std::string& str, - std::function<bool (char)> pred) - { std::vector<std::string> elems; if(str.empty()) return elems; std::string substr; for(auto i = str.begin(); i != str.end(); ++i) { - if(pred(*i)) + if(*i == delim) { if(!substr.empty()) elems.push_back(substr); diff --git a/src/lib/utils/parsing.h b/src/lib/utils/parsing.h index 01a17bc3a..ba3b5eadd 100644 --- a/src/lib/utils/parsing.h +++ b/src/lib/utils/parsing.h @@ -11,10 +11,7 @@ #include <botan/types.h> #include <string> #include <vector> -#include <set> - #include <istream> -#include <functional> #include <map> namespace Botan { @@ -37,17 +34,6 @@ BOTAN_TEST_API std::vector<std::string> split_on( const std::string& str, char delim); /** -* Split a string on a character predicate -* @param str the input string -* @param pred the predicate -* -* This function will likely be removed in a future release -*/ -std::vector<std::string> -split_on_pred(const std::string& str, - std::function<bool (char)> pred); - -/** * Join a string * @param strs strings to join * @param delim the delimitor |