Pigweed
 
Loading...
Searching...
No Matches
pw::StringBuffer< kSizeBytes > Class Template Reference
Inheritance diagram for pw::StringBuffer< kSizeBytes >:
pw::StringBuilder

Public Member Functions

 StringBuffer (const StringBuffer &other)
 
template<size_t kOtherSizeBytes>
 StringBuffer (const StringBuffer< kOtherSizeBytes > &other)
 
template<size_t kOtherSizeBytes>
StringBufferoperator= (const StringBuffer< kOtherSizeBytes > &other)
 
StringBufferoperator= (const StringBuffer &other)
 
template<size_t kOtherSizeBytes>
StringBufferassign (const StringBuffer< kOtherSizeBytes > &other)
 
 StringBuffer (StringBuffer &&other)=delete
 StringBuffers are not movable: the underlying data must be copied.
 
StringBufferoperator= (StringBuffer &&other)=delete
 StringBuffers are not movable: the underlying data must be copied.
 
template<typename... Args>
StringBufferappend (Args &&... args)
 
template<typename T >
StringBufferoperator<< (T &&value)
 
- Public Member Functions inherited from pw::StringBuilder
constexpr StringBuilder (span< char > buffer)
 Creates an empty pw::StringBuilder.
 
 StringBuilder (span< std::byte > buffer)
 
constexpr StringBuilder (InlineString<> &string)
 
 StringBuilder (const StringBuilder &)=delete
 
StringBuilderoperator= (const StringBuilder &)=delete
 
const char * data () const
 
const char * c_str () const
 
std::string_view view () const
 
 operator std::string_view () const
 
span< const std::byte > as_bytes () const
 
Status status () const
 
StatusWithSize status_with_size () const
 Returns status() and size() as a StatusWithSize.
 
Status last_status () const
 The status from the last operation. May be OK while status() is not OK.
 
bool ok () const
 True if status() is OkStatus().
 
bool empty () const
 True if the string is empty.
 
size_t size () const
 Returns the current length of the string, excluding the null terminator.
 
size_t max_size () const
 Returns the maximum length of the string, excluding the null terminator.
 
void clear ()
 Clears the string and resets its error state.
 
void clear_status ()
 Sets the statuses to OkStatus();.
 
void push_back (char ch)
 
void pop_back ()
 
StringBuilderappend (size_t count, char ch)
 Appends the provided character count times.
 
StringBuilderappend (const char *str, size_t count)
 
StringBuilderappend (const char *str)
 
StringBuilderappend (std::string_view str)
 Appends a std::string_view to the end of the StringBuilder.
 
StringBuilderappend (std::string_view str, size_t pos, size_t count=std::string_view::npos)
 
template<typename T >
StringBuilderoperator<< (const T &value)
 
StringBuilderoperator<< (bool value)
 Provide a few additional operator<< overloads that reduce code size.
 
StringBuilderoperator<< (char value)
 
StringBuilderoperator<< (std::nullptr_t)
 
StringBuilderoperator<< (Status status)
 
StringBuilderFormat (const char *format,...)
 
StringBuilderFormatVaList (const char *format, va_list args)
 
void resize (size_t new_size)
 

Static Public Member Functions

static constexpr size_t max_size ()
 

Additional Inherited Members

- Protected Member Functions inherited from pw::StringBuilder
constexpr StringBuilder (span< char > buffer, const StringBuilder &other)
 Functions to support StringBuffer copies.
 
void CopySizeAndStatus (const StringBuilder &other)
 

The documentation for this class was generated from the following file: