cbuffer
cbuffer copied to clipboard
convenience method for length
Is there a way to get the total number of items in the buffer?
Also, I want to completely dump the buffer by calling .pop()
in iteration. Can I call .pop and then check the size until the size is zero?
I ended up calling .pop()
and then checking if the result is undefined, but I'm still curious if there is a way to continuously check the size of the buffer without calling .toArray().length
.
b.size
is what you want.
Actually, leaving open as a reminder this needs to be documented.
What would be really nice is a remaining size. :)
@acidhax Could add a convince method, but should only need cb.length - cb.size
.