ESPHome 2025.5.0
Loading...
Searching...
No Matches
string_ref.cpp
Go to the documentation of this file.
1#include "string_ref.h"
2
3namespace esphome {
4
5#ifdef USE_JSON
6
7// NOLINTNEXTLINE(readability-identifier-naming)
8void 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
constexpr const char * c_str() const
Definition string_ref.h:68
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
void convertToJson(const StringRef &src, JsonVariant dst)
Definition string_ref.cpp:8