diff --git a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino index ce29a5757..584b15795 100644 --- a/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino +++ b/build/shared/examples/08.Strings/StringIndexOf/StringIndexOf.ino @@ -43,22 +43,22 @@ void loop() { stringOne = ""; int firstListItem = stringOne.indexOf("
  • "); - int secondListItem = stringOne.indexOf("item", firstListItem + 1); - Serial.println("The index of the second list item in the string " + stringOne + " is " + secondClosingBracket); + int secondListItem = stringOne.indexOf("
  • ", firstListItem + 1); + Serial.println("The index of the second list tag in the string " + stringOne + " is " + secondListItem); // lastIndexOf() gives you the last occurrence of a character or string: int lastOpeningBracket = stringOne.lastIndexOf('<'); Serial.println("The index of the last < in the string " + stringOne + " is " + lastOpeningBracket); int lastListItem = stringOne.lastIndexOf("
  • "); - Serial.println("The index of the last list item in the string " + stringOne + " is " + lastListItem); + Serial.println("The index of the last list tag in the string " + stringOne + " is " + lastListItem); // lastIndexOf() can also search for a string: stringOne = "

    Lorem ipsum dolor sit amet

    Ipsem

    Quod

    "; int lastParagraph = stringOne.lastIndexOf("