mirror of
https://github.com/esphome/esphome.git
synced 2026-02-26 14:03:14 -07:00
make sure new stringref functions work
This commit is contained in:
@@ -42,13 +42,13 @@ select:
|
||||
ESP_LOGI("test", "Length: %d", (int)x.length());
|
||||
# Test 6: StringRef.find() method with substring
|
||||
- lambda: |-
|
||||
if (x.find("Option") != StringRef::npos) {
|
||||
if (x.find("Option") != StringRef::NPOS) {
|
||||
ESP_LOGI("test", "Found 'Option' in value");
|
||||
}
|
||||
# Test 7: StringRef.find() method with character
|
||||
- lambda: |-
|
||||
size_t space_pos = x.find(' ');
|
||||
if (space_pos != StringRef::npos) {
|
||||
if (space_pos != StringRef::NPOS) {
|
||||
ESP_LOGI("test", "Space at position: %d", (int)space_pos);
|
||||
}
|
||||
# Test 8: StringRef.substr() method
|
||||
|
||||
Reference in New Issue
Block a user