2
String charAt() and setCharAt()
4
Examples of how to get and set characters of a String
9
http://arduino.cc/en/Tutorial/StringCharacters
11
This example code is in the public domain.
16
Serial.println("\n\nString charAt() and setCharAt():");
20
// make a string to report a sensor reading:
21
String reportString = "SensorReading: 456";
22
Serial.println(reportString);
24
// the reading's most significant digit is at position 15 in the reportString:
25
String mostSignificantDigit = reportString.charAt(15);
26
Serial.println("Most significant digit of the sensor reading is: " + mostSignificantDigit);
31
// you can alo set the character of a string. Change the : to a = character
32
reportString.setCharAt(13, '=');
33
Serial.println(reportString);
35
// do nothing while true:
b'\\ No newline at end of file'