Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

cpl_string.h

00001 /**********************************************************************
00002  * $Id: cpl_string_h-source.html,v 1.1 2000/09/25 20:50:11 warmerda Exp $
00003  *
00004  * Name:     cpl_string.h
00005  * Project:  CPL - Common Portability Library
00006  * Purpose:  String and StringList functions.
00007  * Author:   Daniel Morissette, danmo@videotron.ca
00008  *
00009  **********************************************************************
00010  * Copyright (c) 1998, Daniel Morissette
00011  *
00012  * Permission is hereby granted, free of charge, to any person obtaining a
00013  * copy of this software and associated documentation files (the "Software"),
00014  * to deal in the Software without restriction, including without limitation
00015  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00016  * and/or sell copies of the Software, and to permit persons to whom the
00017  * Software is furnished to do so, subject to the following conditions:
00018  * 
00019  * The above copyright notice and this permission notice shall be included
00020  * in all copies or substantial portions of the Software.
00021  * 
00022  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00023  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00024  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00025  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00026  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00027  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
00028  * DEALINGS IN THE SOFTWARE.
00029  **********************************************************************
00030  *
00031  * $Log: cpl_string_h-source.html,v $
00031  * Revision 1.1  2000/09/25 20:50:11  warmerda
00031  * New
00031  *
00032  * Revision 1.6  2000/04/26 18:25:10  warmerda
00033  * implement CPL_DLL
00034  *
00035  * Revision 1.5  2000/03/30 05:38:48  warmerda
00036  * added CPLParseNameValue
00037  *
00038  * Revision 1.4  1999/06/26 14:05:19  warmerda
00039  * Added CSLFindString().
00040  *
00041  * Revision 1.3  1999/02/17 01:41:58  warmerda
00042  * Added CSLGetField
00043  *
00044  * Revision 1.2  1998/12/04 21:40:42  danmo
00045  * Added more Name=Value manipulation fuctions
00046  *
00047  * Revision 1.1  1998/12/03 18:26:02  warmerda
00048  * New
00049  *
00050  **********************************************************************/
00051 
00052 #ifndef _CPL_STRING_H_INCLUDED
00053 #define _CPL_STRING_H_INCLUDED
00054 
00055 #include "cpl_vsi.h"
00056 #include "cpl_error.h"
00057 #include "cpl_conv.h"
00058 
00059 /*=====================================================================
00060                    Stringlist functions (strlist.c)
00061  =====================================================================*/
00062 CPL_C_START
00063 
00064 char CPL_DLL **CSLAddString(char **papszStrList, const char *pszNewString);
00065 int CPL_DLL CSLCount(char **papszStrList);
00066 const char CPL_DLL *CSLGetField( char **, int );
00067 void CPL_DLL CSLDestroy(char **papszStrList);
00068 char CPL_DLL **CSLDuplicate(char **papszStrList);
00069 
00070 char CPL_DLL **CSLTokenizeString(const char *pszString );
00071 char CPL_DLL **CSLTokenizeStringComplex(const char *pszString,
00072                                    const char *pszDelimiter,
00073                                    int bHonourStrings, int bAllowEmptyTokens );
00074 
00075 int CPL_DLL CSLPrint(char **papszStrList, FILE *fpOut);
00076 char CPL_DLL **CSLLoad(const char *pszFname);
00077 int CPL_DLL CSLSave(char **papszStrList, const char *pszFname);
00078 
00079 char CPL_DLL **CSLInsertStrings(char **papszStrList, int nInsertAtLineNo, 
00080                          char **papszNewLines);
00081 char CPL_DLL **CSLInsertString(char **papszStrList, int nInsertAtLineNo, 
00082                         char *pszNewLine);
00083 char CPL_DLL **CSLRemoveStrings(char **papszStrList, int nFirstLineToDelete,
00084                          int nNumToRemove, char ***ppapszRetStrings);
00085 int CPL_DLL CSLFindString( char **, const char * );
00086 
00087 const char CPL_DLL *CPLSPrintf(char *fmt, ...);
00088 char CPL_DLL **CSLAppendPrintf(char **papszStrList, char *fmt, ...);
00089 
00090 const char CPL_DLL *
00091       CPLParseNameValue(const char *pszNameValue, char **ppszKey );
00092 const char CPL_DLL *
00093       CSLFetchNameValue(char **papszStrList, const char *pszName);
00094 char CPL_DLL **
00095       CSLFetchNameValueMultiple(char **papszStrList, const char *pszName);
00096 char CPL_DLL **
00097       CSLAddNameValue(char **papszStrList, 
00098                       const char *pszName, const char *pszValue);
00099 char CPL_DLL **
00100       CSLSetNameValue(char **papszStrList, 
00101                       const char *pszName, const char *pszValue);
00102 
00103 CPL_C_END
00104 
00105 #endif /* _CPL_STRING_H_INCLUDED */

doxygen1.2.2 Dimitri van Heesch, © 1997-2000