diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-01-28 13:55:49 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-01-28 13:55:50 +0200 |
commit | 4a0e4c7d706f33fb72fe809434676b1de7b4b4f7 (patch) | |
tree | 36fdd03f84ae78dbd217b5bd255bd86e33db1bcc /contrib/epee/include/string_tools.h | |
parent | Merge pull request #5008 (diff) | |
parent | Pruning (diff) | |
download | monero-4a0e4c7d706f33fb72fe809434676b1de7b4b4f7.tar.xz |
Merge pull request #4843
b750fb27 Pruning (moneromooo-monero)
Diffstat (limited to '')
-rw-r--r-- | contrib/epee/include/string_tools.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/epee/include/string_tools.h b/contrib/epee/include/string_tools.h index f7539fb6c..2e65876e6 100644 --- a/contrib/epee/include/string_tools.h +++ b/contrib/epee/include/string_tools.h @@ -206,6 +206,15 @@ POP_WARNINGS return boost::lexical_cast<std::string>(val); } //---------------------------------------------------------------------------- + inline std::string to_string_hex(uint32_t val) + { + std::stringstream ss; + ss << std::hex << val; + std::string s; + ss >> s; + return s; + } + //---------------------------------------------------------------------------- inline bool compare_no_case(const std::string& str1, const std::string& str2) { |