% limb manual
% buffer_len(3)
% limb 0.1.0
% 2023-07-24
# NAME
buffer_len, buffer_getlen - get used/available length of an I/O buffer
# SYNOPSIS
#include <limb/buffer.h>
```pre hl
size_t buffer_len(buffer *<em>buf</em>)
size_t buffer_getlen(buffer *<em>buf</em>)
size_t buffer_available(buffer *<em>buf</em>)
```
# DESCRIPTION
The `buffer_len`() macro returns the amount of data currently in the internal
memory of the buffer pointed by `buf`, i.e. either read or not yet flushed to
its associated file descriptor.
The `buffer_getlen`() function is similar, but as a function.
The `buffer_available`() macro returns the amount of space available in the
internal memory of the buffer pointed by `buf`.
# RETURN VALUE
The `buffer_len`() and `buffer_getlen`() functions return the amount of data
currently in the buffer pointed by `buf`.
The `buffer_available`() macro returns the amount of space available in the
internal memory of the buffer pointed by `buf`.