16 #include "../../include/ecl/devices/string.hpp" 52 new_buffer =
new char[
size()+no_bytes+1];
53 memcpy(new_buffer,buffer,
size());
86 }
else if ( rem != 0 ) {
virtual ~String()
Cleans up memory allocations.
Embedded control libraries.
void grow(int no_bytes=256)
Grow the buffer by the specified amount.
long write(char c)
Write a character to the buffer.
String(const char *str="")
Initialises the string device.
long read(char &c)
Read a character from the string device.
std::string str()
String representation of the device's contents.
unsigned long size()
Number of characters stored in the buffer.
unsigned long buffer_length
unsigned long remaining()
Specifies the number of characters remaining to be read..
const char * c_str()
Character string representation of the device's contents.
void clear()
Clears the device's internal buffers.