#include "lldb/Utility/StringExtractor.h"
#include "llvm/ADT/StringExtras.h"
#include <tuple>
#include <cctype>
#include <cstdlib>
#include <cstring>
static inline int xdigit_to_sint(char ch) { … }
StringExtractor::StringExtractor() : … { … }
StringExtractor::StringExtractor(llvm::StringRef packet_str) : … { … }
StringExtractor::StringExtractor(const char *packet_cstr) : … { … }
StringExtractor::~StringExtractor() = default;
char StringExtractor::GetChar(char fail_value) { … }
int StringExtractor::DecodeHexU8() { … }
uint8_t StringExtractor::GetHexU8(uint8_t fail_value, bool set_eof_on_fail) { … }
bool StringExtractor::GetHexU8Ex(uint8_t &ch, bool set_eof_on_fail) { … }
uint32_t StringExtractor::GetU32(uint32_t fail_value, int base) { … }
int32_t StringExtractor::GetS32(int32_t fail_value, int base) { … }
uint64_t StringExtractor::GetU64(uint64_t fail_value, int base) { … }
int64_t StringExtractor::GetS64(int64_t fail_value, int base) { … }
uint32_t StringExtractor::GetHexMaxU32(bool little_endian,
uint32_t fail_value) { … }
uint64_t StringExtractor::GetHexMaxU64(bool little_endian,
uint64_t fail_value) { … }
bool StringExtractor::ConsumeFront(const llvm::StringRef &str) { … }
size_t StringExtractor::GetHexBytes(llvm::MutableArrayRef<uint8_t> dest,
uint8_t fail_fill_value) { … }
size_t StringExtractor::GetHexBytesAvail(llvm::MutableArrayRef<uint8_t> dest) { … }
size_t StringExtractor::GetHexByteString(std::string &str) { … }
size_t StringExtractor::GetHexByteStringFixedLength(std::string &str,
uint32_t nibble_length) { … }
size_t StringExtractor::GetHexByteStringTerminatedBy(std::string &str,
char terminator) { … }
bool StringExtractor::GetNameColonValue(llvm::StringRef &name,
llvm::StringRef &value) { … }
void StringExtractor::SkipSpaces() { … }