readString() reads characters from a stream into a String. The function terminates if it times out (see Stream.setTimeout()).
This function is similar to readBytes(), but returns a String object instead of storing the data in a buffer.
This function is part of the Stream class, and can be called by any class that inherits from it (Wire, Serial, etc). See the Stream class main page for more information.
stream.readString()
None.
A String containing the characters read from the stream, or an empty String if no data is available. Data type: String.