Arduino Radio Library  0.9
A set of Arduino libraries to control diverse FM radio receiver chips in Arduino projects.
Public Member Functions | Private Attributes | List of all members
StringBuffer Class Reference

#include <StringBuffer.h>

Public Member Functions

 StringBuffer (char *buffer, unsigned int bufferSize)
 setup a StringBuffer by passing a local char[] variable and it's size. More...
 
void clear ()
 clear the buffer. More...
 
char * getBuffer ()
 
uint16_t getLength ()
 
void append (char c)
 
void append (const char *txt)
 
void append (const __FlashStringHelper *txt)
 
void append (int num)
 Append a number. More...
 
void append (uint32_t num)
 Append a number. More...
 
void appendQuoted (const char *txt)
 Append a string with enclosing quotes at the given buffer. More...
 
void appendJSON (const char *name, char *value)
 Append an object with value in the JSON notation to the buffer. More...
 
void appendJSON (const char *name, int value)
 Append an object with value in the JSON notation to the buffer. More...
 

Private Attributes

char * _buf
 The allocated buffer. More...
 
unsigned int _size
 The size of the buffer. More...
 
unsigned int _len
 The actual used len of the buffer. More...
 

Constructor & Destructor Documentation

StringBuffer::StringBuffer ( char *  buffer,
unsigned int  bufferSize 
)
inline

setup a StringBuffer by passing a local char[] variable and it's size.

Member Function Documentation

void StringBuffer::append ( char  c)
inline
void StringBuffer::append ( const char *  txt)
inline
void StringBuffer::append ( const __FlashStringHelper *  txt)
inline
void StringBuffer::append ( int  num)
inline

Append a number.

void StringBuffer::append ( uint32_t  num)
inline

Append a number.

void StringBuffer::appendJSON ( const char *  name,
char *  value 
)
inline

Append an object with value in the JSON notation to the buffer.

void StringBuffer::appendJSON ( const char *  name,
int  value 
)
inline

Append an object with value in the JSON notation to the buffer.

void StringBuffer::appendQuoted ( const char *  txt)
inline

Append a string with enclosing quotes at the given buffer.

void StringBuffer::clear ( )
inline

clear the buffer.

char* StringBuffer::getBuffer ( )
inline
uint16_t StringBuffer::getLength ( )
inline

Member Data Documentation

char* StringBuffer::_buf
private

The allocated buffer.

unsigned int StringBuffer::_len
private

The actual used len of the buffer.

unsigned int StringBuffer::_size
private

The size of the buffer.


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