SmallString: Add append_vformat()
This commit is contained in:
parent
86d78e5eca
commit
f4265edb2d
|
@ -526,6 +526,11 @@ std::span<u8> SmallStringBase::bspan()
|
|||
return std::span<u8>(reinterpret_cast<u8*>(m_buffer), m_length);
|
||||
}
|
||||
|
||||
void SmallStringBase::append_vformat(fmt::string_view fmt, fmt::format_args args)
|
||||
{
|
||||
fmt::vformat_to(std::back_inserter(*this), fmt, args);
|
||||
}
|
||||
|
||||
void SmallStringBase::vformat(fmt::string_view fmt, fmt::format_args args)
|
||||
{
|
||||
clear();
|
||||
|
|
|
@ -66,6 +66,7 @@ public:
|
|||
|
||||
template<typename... T>
|
||||
void append_format(fmt::format_string<T...> fmt, T&&... args);
|
||||
void append_vformat(fmt::string_view fmt, fmt::format_args args);
|
||||
|
||||
// append hex string
|
||||
void append_hex(const void* data, size_t len, bool comma_separate = false);
|
||||
|
@ -100,7 +101,6 @@ public:
|
|||
|
||||
template<typename... T>
|
||||
void format(fmt::format_string<T...> fmt, T&&... args);
|
||||
|
||||
void vformat(fmt::string_view fmt, fmt::format_args args);
|
||||
|
||||
// compare one string to another
|
||||
|
|
Loading…
Reference in New Issue