18#ifndef INCLUDED_PS_STRINGBUILDER
19#define INCLUDED_PS_STRINGBUILDER
29#if defined(__cpp_lib_to_chars)
54 typename std::enable_if<std::is_arithmetic_v<T>>::type
Append(
const T value)
noexcept
57#if defined(__cpp_lib_to_chars)
59 ENSURE(result.ec == std::errc());
65 const fmt::format_to_n_result result{
82 void Append(
const std::string_view str)
noexcept
85 std::copy(str.begin(), str.end(),
m_Buffer.begin());
93 std::string_view
Str() noexcept
A helper class to build string in-place without additional cost of allocations, locales and format pa...
Definition: StringBuilder.h:45
void Append(const std::string_view str) noexcept
Definition: StringBuilder.h:82
char * m_BufferBegin
Definition: StringBuilder.h:100
void Append(const char ch)
Definition: StringBuilder.h:74
std::string_view Str() noexcept
Returns a string_view to a null-terminated string.
Definition: StringBuilder.h:93
StringBuilder(std::span< char > buffer) noexcept
Definition: StringBuilder.h:47
std::enable_if< std::is_arithmetic_v< T > >::type Append(const T value) noexcept
Definition: StringBuilder.h:54
std::span< char > m_Buffer
Definition: StringBuilder.h:99
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
Definition: debug.h:222
Definition: GUIManager.h:45
#define T(string_literal)
Definition: secure_crt.cpp:81