diff options
| author | Riccardo Spagni <ric@spagni.net> | 2017-12-17 12:58:46 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2017-12-17 12:58:46 +0200 |
| commit | b806d9844e4cfdb94e7a2d175efdf41d5ad480ff (patch) | |
| tree | f90f634f25079749febf00618ac3160d204f2d7a /contrib/epee/include/string_tools.h | |
| parent | 38ecd0526e32f651892f2e04174404907a563e29 (diff) | |
| parent | 09ce03d612e54231694eee2fb9e5c807b2bfc341 (diff) | |
| download | monzero-core-b806d9844e4cfdb94e7a2d175efdf41d5ad480ff.tar.gz monzero-core-b806d9844e4cfdb94e7a2d175efdf41d5ad480ff.tar.xz monzero-core-b806d9844e4cfdb94e7a2d175efdf41d5ad480ff.zip | |
Merge pull request #2864
09ce03d6 move includes around to lessen overall load (moneromooo-monero)
Diffstat (limited to 'contrib/epee/include/string_tools.h')
| -rw-r--r-- | contrib/epee/include/string_tools.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/contrib/epee/include/string_tools.h b/contrib/epee/include/string_tools.h index 25639263c..307323aa1 100644 --- a/contrib/epee/include/string_tools.h +++ b/contrib/epee/include/string_tools.h @@ -35,15 +35,15 @@ # include <windows.h> #endif +#include <string.h> #include <locale> #include <cstdlib> #include <string> #include <type_traits> -#include <regex> #include <boost/uuid/uuid.hpp> #include <boost/uuid/uuid_io.hpp> #include <boost/lexical_cast.hpp> -#include <boost/algorithm/string.hpp> +#include <boost/algorithm/string/predicate.hpp> #include "hex.h" #include "span.h" #include "warnings.h" @@ -350,11 +350,8 @@ POP_WARNINGS s = *(t_pod_type*)bin_buff.data(); return true; } - //---------------------------------------------------------------------------- - inline bool validate_hex(uint64_t length, const std::string& str) - { - return std::regex_match(str, std::regex("'^[0-9abcdefABCDEF]+$'")) && str.size() == length; - } + //---------------------------------------------------------------------------- + bool validate_hex(uint64_t length, const std::string& str); //---------------------------------------------------------------------------- inline std::string get_extension(const std::string& str) { |
