AceCommon
1.6.1
Arduino library for low-level common functions and features with no external dependencies
|
An interator that points to a character inside a KString. More...
#include <KString.h>
Public Member Functions | |
KStringIterator (const KString &ks) | |
Constructor. | |
char | get () |
Return the current character referenced by the iterator. More... | |
void | next () |
Advance the iterator one character,. | |
An interator that points to a character inside a KString.
This is essentially a stack of 2 pointers. The first pointer points to the current string (either the original string, or inside a fragment string. The second pointer is the previous pointer, usually pointing to the original string. Each component pointer can be either a c-string or an f-string, so there is a type descriminator for each of the component pointer.
char ace_common::KStringIterator::get | ( | ) |
Return the current character referenced by the iterator.
If the iterator points to a compression token (i.e. c < 0x20), then the iterator moves into the fragment string, and continues to return each character of the fragment. When iterator hits the end of the fragment string (hits the NUL character), the iterator returns to the original string, and continues just after the compression token. At the end of the entire string, this method returns a NUL to indicate the end of string.
Definition at line 110 of file KString.cpp.