Stream: helpdesk (published)

Topic: read from IOBuffer without seekstart


view this post on Zulip Expanding Man (Jan 30 2021 at 19:44):

This is a silly question, but I pretty frequently have to execute a pattern of creating an IOBuffer, filling it with some stuff, and then I just want to read the whole thing from the beginning only once. There's no single function in Base for reading it from the beginning is there? Otherwise you have to do seekstart... it's a pretty trivial thing but I have to do this often enough that running the seekstart(io) annoys me.

view this post on Zulip Fredrik Ekre (Jan 30 2021 at 20:04):

take!(io::IOBuffer).

view this post on Zulip Expanding Man (Jan 30 2021 at 20:18):

:picard_facepalm:

view this post on Zulip Expanding Man (Jan 30 2021 at 20:19):

ok, I feel really stupid, because I kind of knew about that, but just usually forget. but thanks!


Last updated: Oct 02 2023 at 04:34 UTC