From 09ce03d612e54231694eee2fb9e5c807b2bfc341 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 25 Nov 2017 22:25:05 +0000 Subject: move includes around to lessen overall load --- contrib/epee/src/string_tools.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'contrib/epee/src/string_tools.cpp') diff --git a/contrib/epee/src/string_tools.cpp b/contrib/epee/src/string_tools.cpp index d04b16b75..fd0254016 100644 --- a/contrib/epee/src/string_tools.cpp +++ b/contrib/epee/src/string_tools.cpp @@ -26,6 +26,8 @@ #include "string_tools.h" +#include + #ifdef _WIN32 # include #else @@ -56,6 +58,16 @@ namespace string_tools return true; } + //---------------------------------------------------------------------------- + bool validate_hex(uint64_t length, const std::string& str) + { + if (str.size() != length) + return false; + for (char c: str) + if (!isxdigit(c)) + return false; + return true; + } } } -- cgit v1.2.3