mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Corrected formatting errors in String examples
This commit is contained in:
@ -48,8 +48,8 @@ void loop() {
|
|||||||
// lastIndexOf() can also search for a string:
|
// lastIndexOf() can also search for a string:
|
||||||
stringOne = "<p>Lorem ipsum dolor sit amet</p><p>Ipsem</p><p>Quod</p>";
|
stringOne = "<p>Lorem ipsum dolor sit amet</p><p>Ipsem</p><p>Quod</p>";
|
||||||
int lastParagraph = stringOne.lastIndexOf("<p");
|
int lastParagraph = stringOne.lastIndexOf("<p");
|
||||||
int penultimateParagraph = stringOne.lastIndexOf("<p", lastParagraph - 1);
|
int secondLastGraf = stringOne.lastIndexOf("<p", lastParagraph - 1);
|
||||||
Serial.println("The index of the second last paragraph tag " + stringOne + " is " + penultimateParagraph);
|
Serial.println("The index of the second last paragraph tag " + stringOne + " is " + secondLastGraf);
|
||||||
|
|
||||||
// do nothing while true:
|
// do nothing while true:
|
||||||
while(true);
|
while(true);
|
||||||
|
Reference in New Issue
Block a user