diff options
author | Treeston <treeston.mmoc@gmail.com> | 2020-08-11 18:04:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 18:04:36 +0200 |
commit | 6116e5b38522ccfb00f6c941c75482e05b4c0799 (patch) | |
tree | dc729202e449d9a1c0e3b9c0516e1a274c8c1244 /src/common/Utilities/Util.h | |
parent | cce1ccdd5cb59070a48562504a0d4d476fd9aad2 (diff) |
Core/Warden: Warden refactors (PR #25235)
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r-- | src/common/Utilities/Util.h | 9 |
1 files changed, 9 insertions, 0 deletions
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<uint8, Size> HexStrToByteArray(std::string const& str, bool reverse = return arr; } +inline std::vector<uint8> HexStrToByteVector(std::string const& str, bool reverse = false) +{ + std::vector<uint8> 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); |