15#if defined(__MINGW32__)
16#define ATTRIBUTE_FORMAT_PRINTF __attribute__((format(__MINGW_PRINTF_FORMAT, 1, 2)))
17#elif defined(__GNUC__)
18#define ATTRIBUTE_FORMAT_PRINTF __attribute__((format(printf, 1, 2)))
20#define ATTRIBUTE_FORMAT_PRINTF
32std::string
stringFormat(
const char* format, ...) ATTRIBUTE_FORMAT_PRINTF;
42struct binaryToStringHelper;
52 for (
size_t i = 0; i < binToStr.buf_.size(); ++i) {
53 auto c =
static_cast<int>(binToStr.buf_.at(i));
54 const bool bTrailingNull = c == 0 && i == binToStr.buf_.size() - 1;
56 if (c <
' ' || c >= 127) {
59 stream.put(
static_cast<char>(c));
103std::string
indent(
size_t i);
Helper structure for the Matroska tags lookup table.
Definition matroskavideo.hpp:39
constexpr binaryToStringHelper< T > binaryToString(Slice< T > &&sl) noexcept
format binary data for display in Image::printStructure()
Definition image_int.hpp:98
std::string indent(size_t i)
indent output for kpsRecursive in printStructure() .
Definition image_int.cpp:38
std::string stringFormat(const char *format,...)
format a string in the pattern of sprintf .
Definition image_int.cpp:12
Helper struct for binary data output via binaryToString.
Definition image_int.hpp:66
Slice (= view) for STL containers.
Definition slice.hpp:421