Skip to content

Document handling of terminator in Stream read*Until functions #512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Language/Functions/Communication/Serial/readBytesUntil.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ Serial.readBytesUntil() reads characters from the serial buffer into an array. T
// OVERVIEW SECTION ENDS


// HOW TO USE SECTION STARTS
[#howtouse]
--

[float]
=== Notes and Warnings
The terminator character is discarded from the serial buffer.
[%hardbreaks]

--
// HOW TO USE SECTION ENDS


// SEE ALSO SECTION
[#see_also]
--
Expand Down
15 changes: 14 additions & 1 deletion Language/Functions/Communication/Serial/readStringUntil.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,25 @@ This function is part of the Stream class, and is called by any class that inher

[float]
=== Returns
The entire String read from the serial buffer, until the terminator character is detected
The entire String read from the serial buffer, up to the terminator character

--
// OVERVIEW SECTION ENDS


// HOW TO USE SECTION STARTS
[#howtouse]
--

[float]
=== Notes and Warnings
The terminator character is discarded from the serial buffer.
[%hardbreaks]

--
// HOW TO USE SECTION ENDS


// SEE ALSO SECTION
[#see_also]
--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ title: Stream.readBytesUntil()

[float]
=== Description
`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 (see link:../streamsettimeout[setTimeout()]).
`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 (see link:../streamsettimeout[setTimeout()]). The function returns the characters up to the last character before the supplied terminator. The terminator itself is not returned in the buffer.

`readBytesUntil()` returns the number of bytes placed in the buffer. A 0 means no valid data was found.

Expand Down Expand Up @@ -43,3 +43,16 @@ The number of bytes placed in the buffer.

--
// OVERVIEW SECTION ENDS


// HOW TO USE SECTION STARTS
[#howtouse]
--

[float]
=== Notes and Warnings
The terminator character is discarded from the stream.
[%hardbreaks]

--
// HOW TO USE SECTION ENDS
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,21 @@ This function is part of the Stream class, and is called by any class that inher

[float]
=== Returns
The entire String read from a stream, until the terminator character is detected.
The entire String read from a stream, up to the terminator character

--
// OVERVIEW SECTION ENDS


// HOW TO USE SECTION STARTS
[#howtouse]
--

[float]
=== Notes and Warnings
The terminator character is discarded from the stream.
[%hardbreaks]

--
// HOW TO USE SECTION ENDS