AceUtils
0.2
Useful Arduino utilties which are too small for separate libraries.
|
25 #ifndef PRINT_STRING_PRINT_STRING_H
26 #define PRINT_STRING_PRINT_STRING_H
65 size_t write(uint8_t c)
override {
66 if (index_ < size_ - 1) {
75 size_t write(
const uint8_t *buf,
size_t size)
override {
76 if (buf ==
nullptr)
return 0;
80 size_t ret = write(*buf++);
94 void flush()
override {
121 PrintStrBase(
const PrintStrBase&) =
delete;
122 PrintStrBase& operator=(
const PrintStrBase&) =
delete;
126 uint16_t
const size_;
218 template <u
int16_t SIZE>
224 char actualBuf_[SIZE];
An alternate implementation of PrintStr that allocates the character array in the heap,...
char *const buf_
This is the pointer to the character array buffer.
size_t length() const
Return the length of the internal c-string buffer.
An implementation of Print that writes to an in-memory buffer supporting strings less than 65535 in l...
Base class for all template instances of the PrintStr<SIZE> class.
const char * getCstr() const
Return the NUL terminated c-string buffer.