#include <folly/String.h>
#include <cctype>
#include <cerrno>
#include <cstdarg>
#include <cstring>
#include <iterator>
#include <sstream>
#include <stdexcept>
#include <glog/logging.h>
#include <folly/Portability.h>
#include <folly/ScopeGuard.h>
#include <folly/container/Array.h>
namespace folly {
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
namespace detail {
struct string_table_c_escape_make_item { … };
struct string_table_c_unescape_make_item { … };
struct string_table_hex_make_item { … };
struct string_table_uri_escape_make_item { … };
FOLLY_STORAGE_CONSTEXPR decltype(cEscapeTable) cEscapeTable = …;
FOLLY_STORAGE_CONSTEXPR decltype(cUnescapeTable) cUnescapeTable = …;
FOLLY_STORAGE_CONSTEXPR decltype(hexTable) hexTable = …;
FOLLY_STORAGE_CONSTEXPR decltype(uriEscapeTable) uriEscapeTable = …;
}
static inline bool is_oddspace(char c) { … }
StringPiece ltrimWhitespace(StringPiece sp) { … }
StringPiece rtrimWhitespace(StringPiece sp) { … }
namespace {
int stringAppendfImplHelper(
char* buf, size_t bufsize, const char* format, va_list args) { … }
void stringAppendfImpl(std::string& output, const char* format, va_list args) { … }
}
std::string stringPrintf(const char* format, ...) { … }
std::string stringVPrintf(const char* format, va_list ap) { … }
std::string& stringAppendf(std::string* output, const char* format, ...) { … }
std::string& stringVAppendf(
std::string* output, const char* format, va_list ap) { … }
void stringPrintf(std::string* output, const char* format, ...) { … }
void stringVPrintf(std::string* output, const char* format, va_list ap) { … }
namespace {
struct PrettySuffix { … };
const PrettySuffix kPrettyTimeSuffixes[] = …;
const PrettySuffix kPrettyTimeHmsSuffixes[] = …;
const PrettySuffix kPrettyBytesMetricSuffixes[] = …;
const PrettySuffix kPrettyBytesBinarySuffixes[] = …;
const PrettySuffix kPrettyBytesBinaryIECSuffixes[] = …;
const PrettySuffix kPrettyUnitsMetricSuffixes[] = …;
const PrettySuffix kPrettyUnitsBinarySuffixes[] = …;
const PrettySuffix kPrettyUnitsBinaryIECSuffixes[] = …;
const PrettySuffix kPrettySISuffixes[] = …;
const PrettySuffix* const kPrettySuffixes[PRETTY_NUM_TYPES] = …;
}
std::string prettyPrint(double val, PrettyType type, bool addSpace) { … }
double prettyToDouble(
folly::StringPiece* const prettyString, const PrettyType type) { … }
double prettyToDouble(folly::StringPiece prettyString, const PrettyType type) { … }
std::string hexDump(const void* ptr, size_t size) { … }
[[maybe_unused]] static std::string invoke_strerror_r(
int (*strerror_r)(int, char*, size_t), int err, char* buf, size_t buflen) { … }
[[maybe_unused]] static std::string invoke_strerror_r(
char* (*strerror_r)(int, char*, size_t),
int err,
char* buf,
size_t buflen) { … }
std::string errnoStr(int err) { … }
namespace {
void toLowerAscii8(char& c) { … }
void toLowerAscii32(uint32_t& c) { … }
void toLowerAscii64(uint64_t& c) { … }
}
void toLowerAscii(char* str, size_t length) { … }
namespace detail {
size_t hexDumpLine(
const void* ptr, size_t offset, size_t size, std::string& line) { … }
}
std::string stripLeftMargin(std::string s) { … }
}
#ifdef FOLLY_DEFINED_DMGL
#undef FOLLY_DEFINED_DMGL
#undef DMGL_NO_OPTS
#undef DMGL_PARAMS
#undef DMGL_ANSI
#undef DMGL_JAVA
#undef DMGL_VERBOSE
#undef DMGL_TYPES
#undef DMGL_RET_POSTFIX
#endif