/* String replace() Examples of how to replace characters or substrings of a String created 27 July 2010 modified 2 Apr 2012 by Tom Igoe http://www.arduino.cc/en/Tutorial/StringReplace This example code is in the public domain. */ void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only } // send an intro: Serial.println("\n\nString replace:\n"); Serial.println(); } void loop() { String stringOne = ""; Serial.println(stringOne); // replace() changes all instances of one substring with another: // first, make a copy of the original string: String stringTwo = stringOne; // then perform the replacements: stringTwo.replace("<", "