Add to git.
[c2lib.git] / doc / pvector.3.html
1 <html>
2 <head>
3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>pvector</title>
6 </head>
7 <body>
8
9 <h1 align=center>pvector</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#AUTHOR">AUTHOR</a><br>
14 <a href="#LICENSE">LICENSE</a><br>
15 <a href="#VERSION">VERSION</a><br>
16 <a href="#SEE ALSO">SEE ALSO</a><br>
17
18 <hr>
19 <!-- Creator     : groff version 1.17.2 -->
20 <!-- CreationDate: Fri May  3 14:58:12 2002 -->
21 <a name="NAME"></a>
22 <h2>NAME</h2>
23 <table width="100%" border=0 rules="none" frame="void"
24        cols="2" cellspacing="0" cellpadding="0">
25 <tr valign="top" align="left">
26 <td width="10%"></td><td width="90%">
27 pvector, pvectora - generate a vector from a list or array of strings</td></table>
28 <a name="SYNOPSIS"></a>
29 <h2>SYNOPSIS</h2>
30
31 <table width="100%" border=0 rules="none" frame="void"
32        cols="2" cellspacing="0" cellpadding="0">
33 <tr valign="top" align="left">
34 <td width="10%"></td><td width="90%">
35 <pre><b>#include &lt;pstring.h&gt;
36
37 vector pvector (pool, ...);
38 vector pvectora (pool, const char *array[], int n);
39 </b></pre></td></table>
40 <a name="DESCRIPTION"></a>
41 <h2>DESCRIPTION</h2>
42
43 <table width="100%" border=0 rules="none" frame="void"
44        cols="2" cellspacing="0" cellpadding="0">
45 <tr valign="top" align="left">
46 <td width="10%"></td><td width="90%">
47 <b>pvector</b> takes a NULL-terminated list of strings as
48 arguments and returns a vector of strings. <b>pvectora</b>
49 takes a pointer to an array of strings and the number of
50 strings and returns a vector of strings.</td></table>
51
52 <table width="100%" border=0 rules="none" frame="void"
53        cols="2" cellspacing="0" cellpadding="0">
54 <tr valign="top" align="left">
55 <td width="10%"></td><td width="90%">
56 A typical use of this is to quickly concatenate
57 strings:</td></table>
58
59 <table width="100%" border=0 rules="none" frame="void"
60        cols="2" cellspacing="0" cellpadding="0">
61 <tr valign="top" align="left">
62 <td width="10%"></td><td width="90%">
63 <b>s = pconcat (pool, pvector (pool, s1, s2, s3,
64 NULL));</b></td></table>
65
66 <table width="100%" border=0 rules="none" frame="void"
67        cols="2" cellspacing="0" cellpadding="0">
68 <tr valign="top" align="left">
69 <td width="10%"></td><td width="90%">
70 which is roughly equivalent to:</td></table>
71
72 <table width="100%" border=0 rules="none" frame="void"
73        cols="2" cellspacing="0" cellpadding="0">
74 <tr valign="top" align="left">
75 <td width="10%"></td><td width="90%">
76 <b>s = psprintf (pool, &quot;%s%s%s&quot;, s1, s2,
77 s3);</b></td></table>
78 <a name="AUTHOR"></a>
79 <h2>AUTHOR</h2>
80
81 <table width="100%" border=0 rules="none" frame="void"
82        cols="2" cellspacing="0" cellpadding="0">
83 <tr valign="top" align="left">
84 <td width="10%"></td><td width="90%">
85 Richard Jones &lt;rich@annexia.org&gt;</td></table>
86 <a name="LICENSE"></a>
87 <h2>LICENSE</h2>
88
89 <table width="100%" border=0 rules="none" frame="void"
90        cols="2" cellspacing="0" cellpadding="0">
91 <tr valign="top" align="left">
92 <td width="10%"></td><td width="90%">
93 GNU LGPL (see http://www.gnu.org/)</td></table>
94 <a name="VERSION"></a>
95 <h2>VERSION</h2>
96
97 <table width="100%" border=0 rules="none" frame="void"
98        cols="2" cellspacing="0" cellpadding="0">
99 <tr valign="top" align="left">
100 <td width="10%"></td><td width="90%">
101 c2lib-1.2.13</td></table>
102 <a name="SEE ALSO"></a>
103 <h2>SEE ALSO</h2>
104
105 <table width="100%" border=0 rules="none" frame="void"
106        cols="2" cellspacing="0" cellpadding="0">
107 <tr valign="top" align="left">
108 <td width="10%"></td><td width="90%">
109 <b>pconcat(3)</b>, <b>psprintf(3)</b>.</td></table>
110 <hr>
111 </body>
112 </html>