sa_off2ptr(3)
limb manual
sa_off2ptr(3)
NAME
sa_off2ptr - turn an array of offsets from an stralloc into an array of strings
SYNOPSIS
#include <limb/samisc.h>
void sa_off2ptr(stralloc *sa, size_t arroff, size_t n)
DESCRIPTION
The sa_off2ptr
() function will transform an array of n
offsets located at
arroff
into sa->s
into an array of string pointers.
This allows to use said array easily with other functions not stralloc-aware.
Hint
You can easily append such an array of offsets from a concatenation of NUL-terminated strings into a stralloc using sa_coloff(3).