Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 1.62 KB

readStringUntil.adoc

File metadata and controls

77 lines (53 loc) · 1.62 KB
title
Serial.readStringUntil()

readStringUntil()

Description

readStringUntil() reads characters from the serial buffer into a String. The function terminates if it times out (see setTimeout()).

This function is part of the Stream class, and is called by any class that inherits from it (Wire, Serial, etc). See the Stream class main page for more information.

Syntax

Serial.readStringUntil(terminator)

Parameters

Serial: serial port object. See the list of available serial ports for each board on the Serial main page.
terminator : the character to search for (char)

Returns

The entire String read from the serial buffer, up to the terminator character

Notes and Warnings

The terminator character is discarded from the serial buffer.

See also