pvector, pvectora - generate a vector from a list or array of strings |
#include <pstring.h> vector pvector (pool, ...); vector pvectora (pool, const char *array[], int n); |
pvector takes a NULL-terminated list of strings as arguments and returns a vector of strings. pvectora takes a pointer to an array of strings and the number of strings and returns a vector of strings. |
A typical use of this is to quickly concatenate strings: |
s = pconcat (pool, pvector (pool, s1, s2, s3, NULL)); |
which is roughly equivalent to: |
s = psprintf (pool, "%s%s%s", s1, s2, s3); |
Richard Jones <rich@annexia.org> |
GNU LGPL (see http://www.gnu.org/) |
c2lib-1.2.13 |
pconcat(3), psprintf(3). |