emlabcpp
modern opinionated embedded C++ library
emlabcpp::string_buffer< N > Struct Template Reference

#include <string_buffer.h>

Public Types

using base_type = std::array< char, N >
 

Public Member Functions

constexpr string_buffer ()
 
constexpr string_buffer (std::string_view sv)
 
template<std::size_t M>
constexpr string_buffer (char const (&msg)[M])
 
template<std::size_t M>
constexpr string_buffer (string_buffer< M > const &msg)
 
 operator std::string_view () const
 
std::string_view sv () const
 
constexpr auto begin ()
 
constexpr auto begin () const
 
constexpr auto end ()
 
constexpr auto end () const
 
constexpr char * data ()
 
constexpr char const * data () const
 
constexpr std::size_t size () const
 
template<std::size_t M>
constexpr auto operator<=> (string_buffer< M > const &other) const noexcept
 
template<std::size_t M>
constexpr bool operator== (string_buffer< M > const &other) const noexcept
 
constexpr bool operator== (std::string_view other) const noexcept
 
string_bufferextend (std::string_view sv)
 

Static Public Attributes

static constexpr std::size_t capacity = N
 

Member Typedef Documentation

◆ base_type

template<std::size_t N>
using emlabcpp::string_buffer< N >::base_type = std::array< char, N >

Constructor & Destructor Documentation

◆ string_buffer() [1/4]

template<std::size_t N>
constexpr emlabcpp::string_buffer< N >::string_buffer ( )
inlineconstexpr

◆ string_buffer() [2/4]

template<std::size_t N>
constexpr emlabcpp::string_buffer< N >::string_buffer ( std::string_view  sv)
inlineconstexpr

◆ string_buffer() [3/4]

template<std::size_t N>
template<std::size_t M>
constexpr emlabcpp::string_buffer< N >::string_buffer ( char const (&)  msg[M])
inlineconstexpr

◆ string_buffer() [4/4]

template<std::size_t N>
template<std::size_t M>
constexpr emlabcpp::string_buffer< N >::string_buffer ( string_buffer< M > const &  msg)
inlineconstexpr

Member Function Documentation

◆ begin() [1/2]

template<std::size_t N>
constexpr auto emlabcpp::string_buffer< N >::begin ( )
inlineconstexpr

◆ begin() [2/2]

template<std::size_t N>
constexpr auto emlabcpp::string_buffer< N >::begin ( ) const
inlineconstexpr

◆ data() [1/2]

template<std::size_t N>
constexpr char* emlabcpp::string_buffer< N >::data ( )
inlineconstexpr

◆ data() [2/2]

template<std::size_t N>
constexpr char const* emlabcpp::string_buffer< N >::data ( ) const
inlineconstexpr

◆ end() [1/2]

template<std::size_t N>
constexpr auto emlabcpp::string_buffer< N >::end ( )
inlineconstexpr

◆ end() [2/2]

template<std::size_t N>
constexpr auto emlabcpp::string_buffer< N >::end ( ) const
inlineconstexpr

◆ extend()

template<std::size_t N>
string_buffer& emlabcpp::string_buffer< N >::extend ( std::string_view  sv)
inline

◆ operator std::string_view()

template<std::size_t N>
emlabcpp::string_buffer< N >::operator std::string_view ( ) const
inline

◆ operator<=>()

template<std::size_t N>
template<std::size_t M>
constexpr auto emlabcpp::string_buffer< N >::operator<=> ( string_buffer< M > const &  other) const
inlineconstexprnoexcept

◆ operator==() [1/2]

template<std::size_t N>
constexpr bool emlabcpp::string_buffer< N >::operator== ( std::string_view  other) const
inlineconstexprnoexcept

◆ operator==() [2/2]

template<std::size_t N>
template<std::size_t M>
constexpr bool emlabcpp::string_buffer< N >::operator== ( string_buffer< M > const &  other) const
inlineconstexprnoexcept

◆ size()

template<std::size_t N>
constexpr std::size_t emlabcpp::string_buffer< N >::size ( ) const
inlineconstexpr

References emlabcpp::N.

◆ sv()

template<std::size_t N>
std::string_view emlabcpp::string_buffer< N >::sv ( ) const
inline

Member Data Documentation

◆ capacity

template<std::size_t N>
constexpr std::size_t emlabcpp::string_buffer< N >::capacity = N
staticconstexpr

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