⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apr__tables_8h-source.html

📁 apr函数库使用手册
💻 HTML
📖 第 1 页 / 共 3 页
字号:
00139 <span class="comment"></span>
00140 <span class="comment">/**</span>
00141 <span class="comment"> * Copy the entire array</span>
00142 <span class="comment"> * @param p The pool to allocate the copy of the array out of</span>
00143 <span class="comment"> * @param arr The array to copy</span>
00144 <span class="comment"> * @return An exact copy of the array passed in</span>
00145 <span class="comment"> * @remark The alternate apr_array_copy_hdr copies only the header, and arranges </span>
00146 <span class="comment"> *         for the elements to be copied if (and only if) the code subsequently</span>
00147 <span class="comment"> *         does a push or arraycat.</span>
00148 <span class="comment"> */</span>
00149 APR_DECLARE(apr_array_header_t *) apr_array_copy(apr_pool_t *p,
00150                                       const apr_array_header_t *arr);<span class="comment"></span>
00151 <span class="comment">/**</span>
00152 <span class="comment"> * Copy the headers of the array, and arrange for the elements to be copied if</span>
00153 <span class="comment"> * and only if the code subsequently does a push or arraycat.</span>
00154 <span class="comment"> * @param p The pool to allocate the copy of the array out of</span>
00155 <span class="comment"> * @param arr The array to copy</span>
00156 <span class="comment"> * @return An exact copy of the array passed in</span>
00157 <span class="comment"> * @remark The alternate apr_array_copy copies the *entire* array.</span>
00158 <span class="comment"> */</span>
00159 APR_DECLARE(apr_array_header_t *) apr_array_copy_hdr(apr_pool_t *p,
00160                                       const apr_array_header_t *arr);
00161 <span class="comment"></span>
00162 <span class="comment">/**</span>
00163 <span class="comment"> * Append one array to the end of another, creating a new array in the process.</span>
00164 <span class="comment"> * @param p The pool to allocate the new array out of</span>
00165 <span class="comment"> * @param first The array to put first in the new array.</span>
00166 <span class="comment"> * @param second The array to put second in the new array.</span>
00167 <span class="comment"> * @return A new array containing the data from the two arrays passed in.</span>
00168 <span class="comment">*/</span>
00169 APR_DECLARE(apr_array_header_t *) apr_array_append(apr_pool_t *p,
00170                                       const apr_array_header_t *first,
00171                                       const apr_array_header_t *second);
00172 <span class="comment"></span>
00173 <span class="comment">/**</span>
00174 <span class="comment"> * Generates a new string from the apr_pool_t containing the concatenated </span>
00175 <span class="comment"> * sequence of substrings referenced as elements within the array.  The string </span>
00176 <span class="comment"> * will be empty if all substrings are empty or null, or if there are no </span>
00177 <span class="comment"> * elements in the array.  If sep is non-NUL, it will be inserted between </span>
00178 <span class="comment"> * elements as a separator.</span>
00179 <span class="comment"> * @param p The pool to allocate the string out of</span>
00180 <span class="comment"> * @param arr The array to generate the string from</span>
00181 <span class="comment"> * @param sep The separator to use</span>
00182 <span class="comment"> * @return A string containing all of the data in the array.</span>
00183 <span class="comment"> */</span>
00184 APR_DECLARE(<span class="keywordtype">char</span> *) apr_array_pstrcat(apr_pool_t *p,
00185                                       const apr_array_header_t *arr,
00186                                       const <span class="keywordtype">char</span> sep);
00187 <span class="comment"></span>
00188 <span class="comment">/**</span>
00189 <span class="comment"> * Make a new table</span>
00190 <span class="comment"> * @param p The pool to allocate the pool out of</span>
00191 <span class="comment"> * @param nelts The number of elements in the initial table.</span>
00192 <span class="comment"> * @return The new table.</span>
00193 <span class="comment"> * @warning This table can only store text data</span>
00194 <span class="comment"> */</span>
00195 APR_DECLARE(apr_table_t *) apr_table_make(apr_pool_t *p, <span class="keywordtype">int</span> nelts);
00196 <span class="comment"></span>
00197 <span class="comment">/**</span>
00198 <span class="comment"> * Create a new table and copy another table into it</span>
00199 <span class="comment"> * @param p The pool to allocate the new table out of</span>
00200 <span class="comment"> * @param t The table to copy</span>
00201 <span class="comment"> * @return A copy of the table passed in</span>
00202 <span class="comment"> */</span>
00203 APR_DECLARE(apr_table_t *) apr_table_copy(apr_pool_t *p,
00204                                           const apr_table_t *t);
00205 <span class="comment"></span>
00206 <span class="comment">/**</span>
00207 <span class="comment"> * Delete all of the elements from a table</span>
00208 <span class="comment"> * @param t The table to clear</span>
00209 <span class="comment"> */</span>
00210 APR_DECLARE(<span class="keywordtype">void</span>) apr_table_clear(apr_table_t *t);
00211 <span class="comment"></span>
00212 <span class="comment">/**</span>
00213 <span class="comment"> * Get the value associated with a given key from the table.  After this call,</span>
00214 <span class="comment"> * The data is still in the table</span>
00215 <span class="comment"> * @param t The table to search for the key</span>
00216 <span class="comment"> * @param key The key to search for</span>
00217 <span class="comment"> * @return The value associated with the key</span>
00218 <span class="comment"> */</span>
00219 APR_DECLARE(const <span class="keywordtype">char</span> *) apr_table_get(const apr_table_t *t, const <span class="keywordtype">char</span> *key);
00220 <span class="comment"></span>
00221 <span class="comment">/**</span>
00222 <span class="comment"> * Add a key/value pair to a table, if another element already exists with the</span>
00223 <span class="comment"> * same key, this will over-write the old data.</span>
00224 <span class="comment"> * @param t The table to add the data to.</span>
00225 <span class="comment"> * @param key The key fo use</span>
00226 <span class="comment"> * @param val The value to add</span>
00227 <span class="comment"> * @remark When adding data, this function makes a copy of both the key and the</span>
00228 <span class="comment"> *         value.</span>
00229 <span class="comment"> */</span>
00230 APR_DECLARE(<span class="keywordtype">void</span>) apr_table_set(apr_table_t *t, const <span class="keywordtype">char</span> *key,
00231                                 const <span class="keywordtype">char</span> *val);
00232 <span class="comment"></span>
00233 <span class="comment">/**</span>
00234 <span class="comment"> * Add a key/value pair to a table, if another element already exists with the</span>
00235 <span class="comment"> * same key, this will over-write the old data.</span>
00236 <span class="comment"> * @param t The table to add the data to.</span>
00237 <span class="comment"> * @param key The key to use</span>
00238 <span class="comment"> * @param val The value to add</span>
00239 <span class="comment"> * @warning When adding data, this function does not make a copy of the key or </span>
00240 <span class="comment"> *          the value, so care should be taken to ensure that the values will </span>
00241 <span class="comment"> *          not change after they have been added..</span>
00242 <span class="comment"> */</span>
00243 APR_DECLARE(<span class="keywordtype">void</span>) apr_table_setn(apr_table_t *t, const <span class="keywordtype">char</span> *key,
00244                                  const <span class="keywordtype">char</span> *val);
00245 <span class="comment"></span>
00246 <span class="comment">/**</span>
00247 <span class="comment"> * Remove data from the table</span>
00248 <span class="comment"> * @param t The table to remove data from</span>
00249 <span class="comment"> * @param key The key of the data being removed</span>
00250 <span class="comment"> */</span>
00251 APR_DECLARE(<span class="keywordtype">void</span>) apr_table_unset(apr_table_t *t, const <span class="keywordtype">char</span> *key);
00252 <span class="comment"></span>
00253 <span class="comment">/**</span>
00254 <span class="comment"> * Add data to a table by merging the value with data that has already been </span>
00255 <span class="comment"> * stored</span>
00256 <span class="comment"> * @param t The table to search for the data</span>
00257 <span class="comment"> * @param key The key to merge data for</span>
00258 <span class="comment"> * @param val The data to add</span>
00259 <span class="comment"> * @remark If the key is not found, then this function acts like apr_table_add</span>
00260 <span class="comment"> */</span>
00261 APR_DECLARE(<span class="keywordtype">void</span>) apr_table_merge(apr_table_t *t, const <span class="keywordtype">char</span> *key,
00262                                   const <span class="keywordtype">char</span> *val);
00263 <span class="comment"></span>
00264 <span class="comment">/**</span>
00265 <span class="comment"> * Add data to a table by merging the value with data that has already been </span>
00266 <span class="comment"> * stored</span>
00267 <span class="comment"> * @param t The table to search for the data</span>
00268 <span class="comment"> * @param key The key to merge data for</span>
00269 <span class="comment"> * @param val The data to add</span>
00270 <span class="comment"> * @remark If the key is not found, then this function acts like apr_table_addn</span>
00271 <span class="comment"> */</span>
00272 APR_DECLARE(<span class="keywordtype">void</span>) apr_table_mergen(apr_table_t *t, const <span class="keywordtype">char</span> *key,
00273                                    const <span class="keywordtype">char</span> *val);
00274 <span class="comment"></span>
00275 <span class="comment">/**</span>
00276 <span class="comment"> * Add data to a table, regardless of whether there is another element with the</span>
00277 <span class="comment"> * same key.</span>
00278 <span class="comment"> * @param t The table to add to</span>
00279 <span class="comment"> * @param key The key to use</span>
00280 <span class="comment"> * @param val The value to add.</span>
00281 <span class="comment"> * @remark When adding data, this function makes a copy of both the key and the</span>
00282 <span class="comment"> *         value.</span>
00283 <span class="comment"> */</span>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -