diff options
Diffstat (limited to '')
-rw-r--r-- | include/pdb/address.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/pdb/address.hpp b/include/pdb/address.hpp index 33e0ac3..4a62249 100644 --- a/include/pdb/address.hpp +++ b/include/pdb/address.hpp @@ -20,4 +20,12 @@ namespace pdb oss << std::hex << std::showbase << address; return oss.str(); } + + inline bool parse_address(Address& dest, const std::string& src) + { + std::istringstream iss{src}; + iss >> std::hex; + char c; + return iss >> dest && !iss.get(c); + } } |