Skip to content

Commit c1d21e1

Browse files
authored
Doctest example for eof (#46012)
1 parent 9edac22 commit c1d21e1

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

base/io.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,19 @@ function will block to wait for more data if necessary, and then return `false`.
173173
it is always safe to read one byte after seeing `eof` return `false`. `eof` will return
174174
`false` as long as buffered data is still available, even if the remote end of a connection
175175
is closed.
176+
177+
# Examples
178+
```jldoctest
179+
julia> b = IOBuffer("my buffer");
180+
181+
julia> eof(b)
182+
false
183+
184+
julia> seekend(b);
185+
186+
julia> eof(b)
187+
true
188+
```
176189
"""
177190
function eof end
178191

0 commit comments

Comments
 (0)