9#ifndef LLDB_UTILITY_STRINGEXTRACTOR_H
10#define LLDB_UTILITY_STRINGEXTRACTOR_H
12#include "llvm/ADT/ArrayRef.h"
13#include "llvm/ADT/StringRef.h"
28 void Reset(llvm::StringRef str) {
58 char GetChar(
char fail_value =
'\0');
61 const char *cstr =
Peek();
69 uint8_t
GetHexU8(uint8_t fail_value = 0,
bool set_eof_on_fail =
true);
71 bool GetHexU8Ex(uint8_t &ch,
bool set_eof_on_fail =
true);
75 int32_t
GetS32(int32_t fail_value,
int base = 0);
77 uint32_t
GetU32(uint32_t fail_value,
int base = 0);
79 int64_t
GetS64(int64_t fail_value,
int base = 0);
81 uint64_t
GetU64(uint64_t fail_value,
int base = 0);
83 uint32_t
GetHexMaxU32(
bool little_endian, uint32_t fail_value);
85 uint64_t
GetHexMaxU64(
bool little_endian, uint64_t fail_value);
87 size_t GetHexBytes(llvm::MutableArrayRef<uint8_t> dest,
88 uint8_t fail_fill_value);