Drop the unused non-ESP8266 forward of str_contains_ignore_case_p

This commit is contained in:
J. Nick Koston
2026-08-20 17:59:27 -05:00
parent cc5916ecca
commit daaaa13318
2 changed files with 0 additions and 13 deletions
-4
View File
@@ -1007,10 +1007,6 @@ inline bool str_contains_ignore_case(const char *haystack, const char *needle) {
return strcasestr(haystack, needle) != nullptr;
#endif // defined(USE_LIBRETINY) || defined(USE_RP2) || defined(USE_ZEPHYR)
}
/// PROGMEM is a no-op on this platform, so the flash-needle variant is the plain check.
inline bool str_contains_ignore_case_p(const char *haystack, const char *needle) {
return str_contains_ignore_case(haystack, needle);
}
#endif // USE_ESP8266
// str_truncate moved to alloc_helpers.h - remove this include before 2026.11.0
-9
View File
@@ -90,10 +90,6 @@ TEST(StringContainsIgnoreCaseTest, NullPointerAlwaysFalse) {
EXPECT_FALSE(str_contains_ignore_case(haystack, needle));
EXPECT_FALSE(str_contains_ignore_case("Hello World", needle));
EXPECT_FALSE(str_contains_ignore_case(haystack, "anything"));
EXPECT_FALSE(str_contains_ignore_case_p(haystack, needle));
EXPECT_FALSE(str_contains_ignore_case_p("Hello World", needle));
EXPECT_FALSE(str_contains_ignore_case_p(haystack, "anything"));
}
TEST(StringContainsIgnoreCaseTest, EmptySearchMatches) {
@@ -128,14 +124,9 @@ TEST(StringContainsIgnoreCaseTest, FallbackMatchesLibc) {
for (const char *needle : {"", "Hello", "hELLO", "HELLO", "Hell", "world", "World", "Heaven", "Hello!", "d"}) {
EXPECT_EQ(str_contains_ignore_case_fallback(haystack, needle), str_contains_ignore_case(haystack, needle))
<< "needle: " << needle;
EXPECT_EQ(str_contains_ignore_case_p(haystack, needle), str_contains_ignore_case(haystack, needle))
<< "needle: " << needle;
}
EXPECT_EQ(str_contains_ignore_case_fallback("", ""), str_contains_ignore_case("", ""));
EXPECT_EQ(str_contains_ignore_case_fallback("ab", "abc"), str_contains_ignore_case("ab", "abc"));
EXPECT_TRUE(str_contains_ignore_case_p("", ""));
EXPECT_FALSE(str_contains_ignore_case_p("", "a"));
EXPECT_FALSE(str_contains_ignore_case_p("ab", "abc"));
}
} // namespace esphome