Pigweed
 
Loading...
Searching...
No Matches
string_builder.h File Reference

pw::StringBuilder facilitates creating formatted strings in a fixed-sized buffer or in a pw::InlineString. It is designed to give the flexibility of std::ostringstream, but with a small footprint. More...

#include <algorithm>
#include <cstdarg>
#include <cstddef>
#include <cstring>
#include <string_view>
#include <type_traits>
#include <utility>
#include "pw_preprocessor/compiler.h"
#include "pw_span/span.h"
#include "pw_status/status.h"
#include "pw_status/status_with_size.h"
#include "pw_string/string.h"
#include "pw_string/to_string.h"

Go to the source code of this file.

Classes

class  pw::StringBuilder
 
class  pw::StringBuffer< kSizeBytes >
 

Namespaces

namespace  pw
 Provides basic helpers for reading and writing UTF-8 encoded strings.
 

Functions

template<typename T >
constexpr size_t pw::string_internal::ArgLength ()
 
template<typename... Args>
constexpr size_t pw::string_internal::DefaultStringBufferSize ()
 
template<size_t kBufferSize, typename... Args>
auto pw::string_internal::InitializeStringBuffer (const Args &... args)
 
template<size_t kBufferSize = 0u, typename... Args>
auto pw::MakeString (Args &&... args)
 

Variables

constexpr size_t pw::string_internal::kDefaultMinimumStringBufferSize = 24
 
constexpr size_t pw::string_internal::kDefaultArgumentSize = 4
 

Detailed Description

pw::StringBuilder facilitates creating formatted strings in a fixed-sized buffer or in a pw::InlineString. It is designed to give the flexibility of std::ostringstream, but with a small footprint.