From 6116e5b38522ccfb00f6c941c75482e05b4c0799 Mon Sep 17 00:00:00 2001 From: Treeston Date: Tue, 11 Aug 2020 18:04:36 +0200 Subject: Core/Warden: Warden refactors (PR #25235) --- src/common/Utilities/Util.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/common') diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 4ee7c99c4ff..f13f39c8912 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -330,6 +330,15 @@ std::array HexStrToByteArray(std::string const& str, bool reverse = return arr; } +inline std::vector HexStrToByteVector(std::string const& str, bool reverse = false) +{ + std::vector buf; + size_t const sz = (str.size() / 2); + buf.resize(sz); + Trinity::Impl::HexStrToByteArray(str, buf.data(), sz, reverse); + return buf; +} + TC_COMMON_API bool StringToBool(std::string const& str); TC_COMMON_API bool StringContainsStringI(std::string const& haystack, std::string const& needle); -- cgit v1.2.3