Removed redundant isxdigit checks and added the ability to GetHexU8() so it can extract an 8 bit hex value if one is available. It will set EOF if "set_eof_on_fail" is true or if out of data. This allows a string decoder to grab a string without losing the last part of the packet with a packet like "414243,abc" (it can extract "ABC" and leave the file position set to the comma).
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154239 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Utility/StringExtractor.h b/source/Utility/StringExtractor.h
index e58eae1..520119c 100644
--- a/source/Utility/StringExtractor.h
+++ b/source/Utility/StringExtractor.h
@@ -93,7 +93,7 @@
GetHexS8 (int8_t fail_value = 0);
uint8_t
- GetHexU8 (uint8_t fail_value = 0);
+ GetHexU8 (uint8_t fail_value = 0, bool set_eof_on_fail = true);
bool
GetNameColonValue (std::string &name, std::string &value);