Welcome to little lamb

Code » limb » master » tree

[master] / src / doc / stralloc.h / stralloc_remove.3.md

% limb manual
% stralloc_remove(3)
% limb 0.1.0
% 2023-07-24

# NAME

stralloc_remove - remove data from a stralloc

# SYNOPSIS

    #include <limb/stralloc.h>

```pre hl
int stralloc_remove(stralloc *<em>sa</em>, size_t <em>offset</em>, size_t <em>len</em>)
```

# DESCRIPTION

The `stralloc_remove`() function removes data from the stralloc `sa` starting at
byte `offset` and for `len` bytes.

The member `len` will be adjusted and data afterwards moved as needed, but no
re-allocation occurs.

# RETURN VALUE

The `stralloc_remove`() function returns 1 on success. Otherwise it returns 0
and sets `errno` to indicate the error.

# ERRORS

The `stralloc_remove`() function may fail if :

: *EINVAL*
:: The `offset` is too high.

# SEE ALSO

[stralloc_shrink](3)