1
0
mirror of synced 2024-12-15 01:01:15 +01:00
ImHex/lib/libimhex/include/hex/helpers/fmt.hpp

25 lines
604 B
C++
Raw Normal View History

2021-08-29 22:15:18 +02:00
#pragma once
#include <string_view>
#include <fmt/format.h>
#include <fmt/chrono.h>
namespace hex {
template<typename... Args>
inline std::string format(std::string_view format, Args... args) {
2021-08-29 22:15:18 +02:00
return fmt::format(fmt::runtime(format), args...);
}
template<typename... Args>
inline void print(std::string_view format, Args... args) {
2021-08-29 22:15:18 +02:00
fmt::print(fmt::runtime(format), args...);
}
template<typename... Args>
inline void println(std::string_view format, Args... args) {
2023-07-22 21:30:22 +02:00
fmt::print(fmt::runtime(format), args...);
fmt::print("\n");
}
2021-08-29 22:15:18 +02:00
}