ESPHome  2024.11.1
string_ref.cpp
Go to the documentation of this file.
1 #include "string_ref.h"
2 
3 namespace esphome {
4 
5 #ifdef USE_JSON
6 
7 // NOLINTNEXTLINE(readability-identifier-naming)
8 void convertToJson(const StringRef &src, JsonVariant dst) { dst.set(src.c_str()); }
9 
10 #endif // USE_JSON
11 
12 } // namespace esphome
StringRef is a reference to a string owned by something else.
Definition: string_ref.h:21
void convertToJson(const StringRef &src, JsonVariant dst)
Definition: string_ref.cpp:8
constexpr const char * c_str() const
Definition: string_ref.h:68
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7