mirror of
https://github.com/esphome/esphome.git
synced 2025-09-24 14:12:24 +01:00
Introduce str_snprintf helper function (#2780)
This commit is contained in:
@@ -57,7 +57,10 @@ bool str_equals_case_insensitive(const std::string &a, const std::string &b);
|
||||
bool str_startswith(const std::string &full, const std::string &start);
|
||||
bool str_endswith(const std::string &full, const std::string &ending);
|
||||
|
||||
/// sprintf-like function returning std::string instead of writing to char array.
|
||||
/// snprintf-like function returning std::string with a given maximum length.
|
||||
std::string __attribute__((format(printf, 1, 3))) str_snprintf(const char *fmt, size_t length, ...);
|
||||
|
||||
/// sprintf-like function returning std::string.
|
||||
std::string __attribute__((format(printf, 1, 2))) str_sprintf(const char *fmt, ...);
|
||||
|
||||
class HighFrequencyLoopRequester {
|
||||
|
Reference in New Issue
Block a user