Skip to content

Commit 9c7e3ab

Browse files
committed
Fixed example StringStartsWithEndsWith.ino
1 parent a74597d commit 9c7e3ab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

build/shared/examples/08.Strings/StringStartsWithEndsWith/StringStartsWithEndsWith.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ void loop() {
4242
String sensorReading = "sensor = ";
4343
sensorReading += analogRead(A0);
4444
Serial.print (sensorReading);
45-
if (sensorReading.endsWith(0)) {
45+
if (sensorReading.endsWith("0")) {
4646
Serial.println(". This reading is divisible by ten");
4747
}
4848
else {
4949
Serial.println(". This reading is not divisible by ten");
50-
5150
}
5251

5352
// do nothing while true:

0 commit comments

Comments
 (0)