A string that may live in flash (on ESP8266): pointer and length, with no byte-reading operations.
More...
#include <string_ref.h>
|
| template<size_t N> |
| static constexpr ProgmemStringRef | from_lit (const char(&s)[N]) |
| | A PROGMEM char array, with its length known at compile time.
|
| |
A string that may live in flash (on ESP8266): pointer and length, with no byte-reading operations.
progmem_ptr() is safe as a "%s" log argument; compare the contents with equals().
Definition at line 230 of file string_ref.h.
◆ ProgmemStringRef() [1/3]
| esphome::ProgmemStringRef::ProgmemStringRef |
( |
| ) |
|
|
constexprdefault |
◆ ProgmemStringRef() [2/3]
| esphome::ProgmemStringRef::ProgmemStringRef |
( |
const char * | s, |
|
|
size_t | len ) |
|
inlineconstexpr |
◆ ProgmemStringRef() [3/3]
| esphome::ProgmemStringRef::ProgmemStringRef |
( |
const StringRef & | s | ) |
|
|
inlineexplicitconstexpr |
◆ c_str()
| const char * esphome::ProgmemStringRef::c_str |
( |
| ) |
const |
|
inlineconstexpr |
◆ empty()
| bool esphome::ProgmemStringRef::empty |
( |
| ) |
const |
|
inlineconstexpr |
◆ equals()
| bool esphome::ProgmemStringRef::equals |
( |
const StringRef & | other | ) |
const |
|
inline |
◆ from_lit()
template<size_t N>
| static constexpr ProgmemStringRef esphome::ProgmemStringRef::from_lit |
( |
const char(&) | s[N] | ) |
|
|
inlinestaticconstexpr |
A PROGMEM char array, with its length known at compile time.
Definition at line 236 of file string_ref.h.
◆ progmem_ptr()
| const char * esphome::ProgmemStringRef::progmem_ptr |
( |
| ) |
const |
|
inlineconstexpr |
◆ size()
| size_t esphome::ProgmemStringRef::size |
( |
| ) |
const |
|
inlineconstexpr |
The documentation for this class was generated from the following file: