llvm/lldb/source/Utility/StringExtractor.cpp

//===-- StringExtractor.cpp -----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#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 constructor
StringExtractor::StringExtractor() :{}

StringExtractor::StringExtractor(llvm::StringRef packet_str) :{}

StringExtractor::StringExtractor(const char *packet_cstr) :{}

// Destructor
StringExtractor::~StringExtractor() = default;

char StringExtractor::GetChar(char fail_value) {}

// If a pair of valid hex digits exist at the head of the StringExtractor they
// are decoded into an unsigned byte and returned by this function
//
// If there is not a pair of valid hex digits at the head of the
// StringExtractor, it is left unchanged and -1 is returned
int StringExtractor::DecodeHexU8() {}

// Extract an unsigned character from two hex ASCII chars in the packet string,
// or return fail_value on failure
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) {}

// Decodes all valid hex encoded bytes at the head of the StringExtractor,
// limited by dst_len.
//
// Returns the number of bytes successfully decoded
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() {}