Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
|
Class to enable buffering of a single line of text, with simple editing. More...
#include <LineBuffer.h>
Public Member Functions | |
char | addChar (char c) |
Add a character to the buffer. More... | |
void | clear () |
Clear contents of buffer. More... | |
char * | getBuffer () |
Get the text, nul-terminated. More... | |
unsigned | getLength () const |
Get number of characters in the text line. More... | |
bool | startsWith (const char *text) const |
Check for matching text at start of line, case-sensitive. More... | |
bool | contains (const char *text) const |
Check for matching text anywhere in line, case-sensitive. More... | |
bool | backspace () |
Remove last character from buffer. More... | |
Class to enable buffering of a single line of text, with simple editing.
char LineBuffer< BUFSIZE >::addChar | ( | char | c | ) |
Add a character to the buffer.
char | Character added to buffer, '\0' if ignored, ' ' if line is complete |
bool LineBuffer< BUFSIZE >::backspace | ( | ) |
Remove last character from buffer.
bool | true if character was removed, false if buffer is empty |
|
inline |
Clear contents of buffer.
bool LineBuffer< BUFSIZE >::contains | ( | const char * | text | ) | const |
Check for matching text anywhere in line, case-sensitive.
text |
bool | true if match found |
|
inline |
Get the text, nul-terminated.
|
inline |
Get number of characters in the text line.
bool LineBuffer< BUFSIZE >::startsWith | ( | const char * | text | ) | const |
Check for matching text at start of line, case-sensitive.
text |
bool | true if match found |