Stream::readBytesUntil, readBytesUntil, Stream.readBytesUntil
readBytesUntil() reads characters from a stream into a buffer. The function terminates if the terminator character is detected, the determined length has been read, or it times out.
// SYNTAX stream.readBytesUntil(terminator, buffer, length);
- stream : an instance of a class that inherits from Stream
- terminator : the character to search for (char)
- buffer : pointer to the buffer to store the bytes in (char *)
- length : the number of bytes to read (size_t)
Returns: returns the number of characters placed in the buffer (0 means no valid data found)