The 2024 Wheel Reinvention Jam is in 16 days. September 23-29, 2024. More info

Question: How can I read the contents of a buffer entirely?

I'd like to get the entire contents of a buffer.

In the docs, I see the function app->buffer_read_range(app, &buffer, start, end, buffer_out), however, I'm having trouble coming up with a way to get the length of a buffer (in order to set the end parameter).

Thanks for any help.
The Buffer_Summary struct acts both as a handle to a buffer, as well as a chunk of memory containing lots of information about the buffer. If you have the Buffer_Summary that refers to the buffer you want, then buffer.size is the length of the entire buffer.
Awesome, thanks.