Stream: helpdesk (published)

Topic: `eachline(::IOBuffer)` for other delimiters


view this post on Zulip Gustavo Goretkin (Feb 17 2021 at 20:02):

Is there an iterator like eachline but using readuntil instead of readline? I want to iterate over 0-terminated byte sequences.

view this post on Zulip Gustavo Goretkin (Feb 17 2021 at 20:14):

my use case:

b = IOBuffer()
run(pipeline(`git ls-files -z`; stdout=b))
seekstart(b)
while !Base.eof(b)
    @show readuntil(b, '\0')
end

Last updated: Nov 06 2024 at 04:40 UTC