Skip to content

Commit 805bd00

Browse files
authored
Merge pull request #512 from per1234/stream-terminator-documentation
Document handling of terminator in Stream read*Until functions
2 parents e9759d0 + 71e4441 commit 805bd00

File tree

4 files changed

+56
-3
lines changed

4 files changed

+56
-3
lines changed

Diff for: Language/Functions/Communication/Serial/readBytesUntil.adoc

+13
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@ Serial.readBytesUntil() reads characters from the serial buffer into an array. T
4545
// OVERVIEW SECTION ENDS
4646

4747

48+
// HOW TO USE SECTION STARTS
49+
[#howtouse]
50+
--
51+
52+
[float]
53+
=== Notes and Warnings
54+
The terminator character is discarded from the serial buffer.
55+
[%hardbreaks]
56+
57+
--
58+
// HOW TO USE SECTION ENDS
59+
60+
4861
// SEE ALSO SECTION
4962
[#see_also]
5063
--

Diff for: Language/Functions/Communication/Serial/readStringUntil.adoc

+14-1
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,25 @@ title: Serial.readStringUntil()
3232

3333
[float]
3434
=== Returns
35-
The entire String read from the serial buffer, until the terminator character is detected
35+
The entire String read from the serial buffer, up to the terminator character
3636

3737
--
3838
// OVERVIEW SECTION ENDS
3939

4040

41+
// HOW TO USE SECTION STARTS
42+
[#howtouse]
43+
--
44+
45+
[float]
46+
=== Notes and Warnings
47+
The terminator character is discarded from the serial buffer.
48+
[%hardbreaks]
49+
50+
--
51+
// HOW TO USE SECTION ENDS
52+
53+
4154
// SEE ALSO SECTION
4255
[#see_also]
4356
--

Diff for: Language/Functions/Communication/Stream/streamReadBytesUntil.adoc

+14-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ title: Stream.readBytesUntil()
1414

1515
[float]
1616
=== Description
17-
`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()]).
17+
`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.
1818

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

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

4444
--
4545
// OVERVIEW SECTION ENDS
46+
47+
48+
// HOW TO USE SECTION STARTS
49+
[#howtouse]
50+
--
51+
52+
[float]
53+
=== Notes and Warnings
54+
The terminator character is discarded from the stream.
55+
[%hardbreaks]
56+
57+
--
58+
// HOW TO USE SECTION ENDS

Diff for: Language/Functions/Communication/Stream/streamReadStringUntil.adoc

+15-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,21 @@ This function is part of the Stream class, and can be called by any class that i
3333

3434
[float]
3535
=== Returns
36-
The entire String read from a stream, until the terminator character is detected.
36+
The entire String read from a stream, up to the terminator character
3737

3838
--
3939
// OVERVIEW SECTION ENDS
40+
41+
42+
// HOW TO USE SECTION STARTS
43+
[#howtouse]
44+
--
45+
46+
[float]
47+
=== Notes and Warnings
48+
The terminator character is discarded from the stream.
49+
[%hardbreaks]
50+
51+
--
52+
// HOW TO USE SECTION ENDS
53+

0 commit comments

Comments
 (0)