UCommon
Public Member Functions
ucommon::stringbuf< S > Class Template Reference

A string class that has a predefined string buffer. More...

#include <string.h>

Inherits memstring.

Public Member Functions

void operator= (const char *text)
 Assign a string buffer from a null terminated string. More...
 
void operator= (String &object)
 Assign a string buffer from another string object. More...
 
 stringbuf ()
 Create an empty instance of a string buffer. More...
 
 stringbuf (const char *text)
 Create a string buffer from a null terminated string. More...
 

Detailed Description

template<size_t S>
class ucommon::stringbuf< S >

A string class that has a predefined string buffer.

The string class and buffer are allocated together as one object. This allows one to use string objects entirely resident on the local stack as well as on the heap. Using a string class on the local stack may be more convenient than a char array since one can use all the features of the class including assignment and concatenation which a char buffer cannot as easily do.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Examples
string.cpp.

Definition at line 1594 of file string.h.

Constructor & Destructor Documentation

◆ stringbuf() [1/2]

template<size_t S>
ucommon::stringbuf< S >::stringbuf ( )
inline

Create an empty instance of a string buffer.

Definition at line 1603 of file string.h.

◆ stringbuf() [2/2]

template<size_t S>
ucommon::stringbuf< S >::stringbuf ( const char *  text)
inline

Create a string buffer from a null terminated string.

Parameters
textto place in object.

Definition at line 1609 of file string.h.

Member Function Documentation

◆ operator=() [1/2]

template<size_t S>
void ucommon::stringbuf< S >::operator= ( const char *  text)
inline

Assign a string buffer from a null terminated string.

Parameters
textto assign to object.

Definition at line 1617 of file string.h.

◆ operator=() [2/2]

template<size_t S>
void ucommon::stringbuf< S >::operator= ( String &  object)
inline

Assign a string buffer from another string object.

Parameters
objectto assign from.

Definition at line 1625 of file string.h.


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