8 if (string_ == s) {
return 0; }
9 if (string_ ==
nullptr) {
return -1; }
10 if (s ==
nullptr) {
return 1; }
12 const char* a = (
const char*) string_;
25 uint8_t ca = (type_ == kTypeCstring) ? *a : pgm_read_byte(a);
31 if (0 < ca && ca < numKeywords_) {
33 const char* k = keywords.
get(ca);
35 ca = (type_ == kTypeCstring) ? *k : pgm_read_byte(k);
44 return (
int) ca - (int) cb;
50 return (
int) ca - (int) cb;
53 if (ca ==
'\0')
return 0;
60 if (
this == &s) {
return 0; }
61 if (string_ == s.string_) {
return 0; }
62 if (string_ ==
nullptr) {
return -1; }
63 if (s.string_ ==
nullptr) {
return 1; }
68 char ca = aiter.
get();
69 char cb = biter.
get();
84 const char* s = (
const char*) string_;
85 if (s ==
nullptr)
return;
92 char c = (type_ == kTypeCstring) ? *s : pgm_read_byte(s);
96 if (c < numKeywords_) {
97 if (type_ == kTypeCstring) {
98 printer.print((
const char*) keywords_[(uint8_t) c]);
100 printer.print((
const __FlashStringHelper*)
101 pgm_read_ptr(keywords_ + (uint8_t) c));
112 char c = getInternal(ks_.type_, firstPtr_);
114 if (secondPtr_ !=
nullptr) {
116 firstPtr_ = secondPtr_;
117 secondPtr_ =
nullptr;
121 c = getInternal(ks_.type_, firstPtr_);
125 if (c !=
'\0' && c < 0x20) {
127 secondPtr_ = firstPtr_;
129 firstPtr_ = keywords.
get((uint8_t) c);
130 c = getInternal(ks_.type_, firstPtr_);
An interator that points to a character inside a KString.
void next()
Advance the iterator one character,.
char get()
Return the current character referenced by the iterator.
A thin helper object around an array of const char* in regular memory, or an array of const __FlashSt...
const char * get(uint8_t i) const
Return the string pointer of index i.
A wrapper class around a normal c-string or Arduino f-string which is encoded and compressed using ke...
void printTo(Print &printer)
Expand and print the current string to the given printer.
int compareTo(const char *s)
Compare this string against a c-string s and return <0, 0 or >0 if this string is <,...