From 6298361cc91b902a56f819f76d5a0a5ff942d0f8 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 21 Nov 2023 00:13:12 +0100 Subject: [PATCH] format --- esphome/core/helpers.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/esphome/core/helpers.cpp b/esphome/core/helpers.cpp index d6280fa537..2adda076f4 100644 --- a/esphome/core/helpers.cpp +++ b/esphome/core/helpers.cpp @@ -279,9 +279,12 @@ std::string str_snake_case(const std::string &str) { } std::string str_sanitize(const std::string &str) { std::string out; - std::replace_if(str.begin(), str.end(), [](const char &c) { - return c == '-' || c == '_' || (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); - }, '_'); + std::replace_if( + str.begin(), str.end(), + [](const char &c) { + return c == '-' || c == '_' || (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + }, + '_'); return out; } std::string str_snprintf(const char *fmt, size_t len, ...) {