repr 0.1
Reconstructable string representations and more
Loading...
Searching...
No Matches
librepr::detail::StringBuffer Struct Reference

#include <buffer.h>

Public Member Functions

 StringBuffer ()=default
 
 StringBuffer (std::string_view in)
 
void write (const char *beg, const char *end)
 
LIBREPR_HINT_INLINE void write (std::string_view sv)
 
LIBREPR_HINT_INLINE void write (char c)
 
LIBREPR_HINT_INLINE std::string && extract ()
 
LIBREPR_HINT_INLINE const std::stringoperator-> () const
 
std::size_t size ()
 
void set_cursor (std::size_t index=std::string::npos)
 
void flush ()
 

Friends

StringBufferoperator<< (StringBuffer &buf, std::string_view sv)
 
StringBufferoperator<< (StringBuffer &buf, char c)
 
std::ostreamoperator<< (std::ostream &stream, StringBuffer &buf)
 

Constructor & Destructor Documentation

◆ StringBuffer() [1/2]

librepr::detail::StringBuffer::StringBuffer ( )
default

◆ StringBuffer() [2/2]

librepr::detail::StringBuffer::StringBuffer ( std::string_view  in)
inlineexplicit

Member Function Documentation

◆ extract()

LIBREPR_HINT_INLINE std::string && librepr::detail::StringBuffer::extract ( )
inline

◆ flush()

void librepr::detail::StringBuffer::flush ( )
inline

◆ operator->()

LIBREPR_HINT_INLINE const std::string * librepr::detail::StringBuffer::operator-> ( ) const
inline

◆ set_cursor()

void librepr::detail::StringBuffer::set_cursor ( std::size_t  index = std::string::npos)
inline

◆ size()

std::size_t librepr::detail::StringBuffer::size ( )
inline

◆ write() [1/3]

LIBREPR_HINT_INLINE void librepr::detail::StringBuffer::write ( char  c)
inline

◆ write() [2/3]

void librepr::detail::StringBuffer::write ( const char beg,
const char end 
)
inline

◆ write() [3/3]

LIBREPR_HINT_INLINE void librepr::detail::StringBuffer::write ( std::string_view  sv)
inline

Friends And Related Symbol Documentation

◆ operator<< [1/3]

std::ostream & operator<< ( std::ostream stream,
StringBuffer buf 
)
friend

◆ operator<< [2/3]

StringBuffer & operator<< ( StringBuffer buf,
char  c 
)
friend

◆ operator<< [3/3]

StringBuffer & operator<< ( StringBuffer buf,
std::string_view  sv 
)
friend

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