AceCommon
1.4.5
Arduino library for low-level common functions and features with no external dependencies
|
25 #ifndef ACE_COMMON_KSTRING_H
26 #define ACE_COMMON_KSTRING_H
29 class __FlashStringHelper;
32 namespace ace_common {
63 const char*
const* keywords,
69 numKeywords_(numKeywords > 0x20 ? 0x20 : numKeywords)
74 const __FlashStringHelper* fs,
75 const char*
const* keywords,
81 numKeywords_(numKeywords > 0x20 ? 0x20 : numKeywords)
94 static const uint8_t kTypeCstring = 0;
95 static const uint8_t kTypeFstring = 1;
99 const void*
const string_;
100 const char*
const*
const keywords_;
102 uint8_t
const numKeywords_;
void printTo(Print &printer)
Expand and print the current string to the given printer.
KString(const char *s, const char *const *keywords, uint8_t numKeywords)
Constructor around a simple c-string.
A wrapper class around a normal c-string or Arduino f-string which is encoded and compressed using ke...
KString(const __FlashStringHelper *fs, const char *const *keywords, uint8_t numKeywords)
Constructor around an Arduino Flash string.
int compareTo(const char *s)
Compare this string against s and return <0, 0 or >0 if this string is less than, equal to,...