~donmcc/astr

88a05a89f5f0572cd8db2c50224e47523eec6ce4 — Don McCaughey 1 year, 6 months ago ad6abcb
Added a better overview section.

Updated both the readme file and the man page.
2 files changed, 17 insertions(+), 5 deletions(-)

M README.md
M astr.3
M README.md => README.md +8 -0
@@ 6,6 6,14 @@ A C99 library for working with dynamically allocated strings.

## Overview

*astr* is a library of functions that make working with dynamically allocated
strings easier and less error prone.  All functions in *astr* accept `NULL`
string pointers, treating them similarly to a zero-length string.  Reallocating
functions make string building easier automatically resizing the string as
needed.

### Naming Conventions

All functions in *astr* begin with the `astr_` prefix.  Functions that return
newly allocated strings will contain `_alloc` in their names; the caller is
responsible for calling [`free()`][1] on the returned pointer.

M astr.3 => astr.3 +9 -5
@@ 38,11 38,15 @@
.Sh DESCRIPTION
The
.Nm astr
library provides functions for working with dynamically allocated strings,
building on top of
.Fn vasprintf
and
.Fn vsnprintf .
library provides functions that make working with dynamically allocated strings
easier and less error prone.
All functions in
.Nm astr
accept
.Dv NULL
string pointers, treating them similarly to a zero-length string.
Reallocating functions make string building easier automatically resizing the
string as needed.
.Pp
All functions in the
.Nm astr