Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

apr_strings.h

Go to the documentation of this file.
00001 /* Copyright 2000-2004 The Apache Software Foundation
00002  *
00003  * Licensed under the Apache License, Version 2.0 (the "License");
00004  * you may not use this file except in compliance with the License.
00005  * You may obtain a copy of the License at
00006  *
00007  *     http://www.apache.org/licenses/LICENSE-2.0
00008  *
00009  * Unless required by applicable law or agreed to in writing, software
00010  * distributed under the License is distributed on an "AS IS" BASIS,
00011  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00012  * See the License for the specific language governing permissions and
00013  * limitations under the License.
00014  */
00015 
00016 /* Portions of this file are covered by */
00017 /* -*- mode: c; c-file-style: "k&r" -*-
00018 
00019   strnatcmp.c -- Perform 'natural order' comparisons of strings in C.
00020   Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au>
00021 
00022   This software is provided 'as-is', without any express or implied
00023   warranty.  In no event will the authors be held liable for any damages
00024   arising from the use of this software.
00025 
00026   Permission is granted to anyone to use this software for any purpose,
00027   including commercial applications, and to alter it and redistribute it
00028   freely, subject to the following restrictions:
00029 
00030   1. The origin of this software must not be misrepresented; you must not
00031      claim that you wrote the original software. If you use this software
00032      in a product, an acknowledgment in the product documentation would be
00033      appreciated but is not required.
00034   2. Altered source versions must be plainly marked as such, and must not be
00035      misrepresented as being the original software.
00036   3. This notice may not be removed or altered from any source distribution.
00037 */
00038 
00039 #ifndef APR_STRINGS_H
00040 #define APR_STRINGS_H
00041 
00047 #include "apr.h"
00048 #include "apr_errno.h"
00049 #include "apr_pools.h"
00050 #define APR_WANT_IOVEC
00051 #include "apr_want.h"
00052 
00053 #if APR_HAVE_STDARG_H
00054 #include <stdarg.h>
00055 #endif
00056 
00057 #ifdef __cplusplus
00058 extern "C" {
00059 #endif /* __cplusplus */
00060 
00075 APR_DECLARE(int) apr_strnatcmp(char const *a, char const *b);
00076 
00086 APR_DECLARE(int) apr_strnatcasecmp(char const *a, char const *b);
00087 
00094 APR_DECLARE(char *) apr_pstrdup(apr_pool_t *p, const char *s);
00095 
00108 APR_DECLARE(char *) apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n);
00109 
00118 APR_DECLARE(char *) apr_pstrndup(apr_pool_t *p, const char *s, apr_size_t n);
00119 
00128 APR_DECLARE(void *) apr_pmemdup(apr_pool_t *p, const void *m, apr_size_t n);
00129 
00136 APR_DECLARE_NONSTD(char *) apr_pstrcat(apr_pool_t *p, ...);
00137 
00146 APR_DECLARE(char *) apr_pstrcatv(apr_pool_t *p, const struct iovec *vec,
00147                                  apr_size_t nvec, apr_size_t *nbytes);
00148 
00157 APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap);
00158 
00167 APR_DECLARE_NONSTD(char *) apr_psprintf(apr_pool_t *p, const char *fmt, ...)
00168         __attribute__((format(printf,2,3)));
00169 
00189 APR_DECLARE(char *) apr_cpystrn(char *dst, const char *src,
00190                                 apr_size_t dst_size);
00191 
00198 APR_DECLARE(char *) apr_collapse_spaces(char *dest, const char *src);
00199 
00207 APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str,
00208                                                char ***argv_out,
00209                                                apr_pool_t *token_context);
00210 
00222 APR_DECLARE(char *) apr_strtok(char *str, const char *sep, char **last);
00223 
00254 APR_DECLARE_NONSTD(int) apr_snprintf(char *buf, apr_size_t len,
00255                                      const char *format, ...)
00256         __attribute__((format(printf,3,4)));
00257 
00266 APR_DECLARE(int) apr_vsnprintf(char *buf, apr_size_t len, const char *format,
00267                                va_list ap);
00276 APR_DECLARE(char *) apr_itoa(apr_pool_t *p, int n);
00277 
00284 APR_DECLARE(char *) apr_ltoa(apr_pool_t *p, long n);
00285 
00292 APR_DECLARE(char *) apr_off_t_toa(apr_pool_t *p, apr_off_t n);
00293 
00308 APR_DECLARE(apr_int64_t) apr_strtoi64(const char *buf, char **end, int base);
00309 
00316 APR_DECLARE(apr_int64_t) apr_atoi64(const char *buf);
00317 
00326 APR_DECLARE(char *) apr_strfsize(apr_off_t size, char *buf);
00327 
00330 #ifdef __cplusplus
00331 }
00332 #endif
00333 
00334 #endif  /* !APR_STRINGS_H */

Generated on Fri Sep 17 11:18:21 2004 for Apache Portable Runtime by doxygen 1.3.5