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

#include <string_buffer.h>

+ Inheritance diagram for emlabcpp::string_buffer< N >:
+ Collaboration diagram for emlabcpp::string_buffer< N >:

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
 
constexpr std::size_t size () const
 
template<std::size_t M>
constexpr bool operator== (string_buffer< M > const &other) const noexcept
 
constexpr bool operator== (std::string_view other) const noexcept
 

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

References emlabcpp::data(), and emlabcpp::N.

◆ string_buffer() [2/4]

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

References emlabcpp::min(), and emlabcpp::N.

◆ 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

References emlabcpp::N.

◆ 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

References emlabcpp::N.

Member Function Documentation

◆ operator std::string_view()

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

References emlabcpp::data().

◆ 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::data().

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: