00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
#ifndef _CPL_STRING_H_INCLUDED
00080
#define _CPL_STRING_H_INCLUDED
00081
00082
#include "cpl_vsi.h"
00083
#include "cpl_error.h"
00084
#include "cpl_conv.h"
00085
00104 CPL_C_START
00105
00106
char CPL_DLL **CSLAddString(
char **papszStrList,
const char *pszNewString);
00107
int CPL_DLL CSLCount(
char **papszStrList);
00108
const char CPL_DLL *CSLGetField(
char **,
int );
00109
void CPL_DLL CSLDestroy(
char **papszStrList);
00110
char CPL_DLL **CSLDuplicate(
char **papszStrList);
00111
00112
char CPL_DLL **CSLTokenizeString(
const char *pszString );
00113
char CPL_DLL **CSLTokenizeStringComplex(
const char *pszString,
00114
const char *pszDelimiter,
00115
int bHonourStrings,
int bAllowEmptyTokens );
00116
char CPL_DLL **CSLTokenizeString2(
const char *pszString,
00117
const char *pszDelimeter,
00118
int nCSLTFlags );
00119
00120
#define CSLT_HONOURSTRINGS 0x0001
00121
#define CSLT_ALLOWEMPTYTOKENS 0x0002
00122
#define CSLT_PRESERVEQUOTES 0x0004
00123
#define CSLT_PRESERVEESCAPES 0x0008
00124
00125
int CPL_DLL CSLPrint(
char **papszStrList, FILE *fpOut);
00126
char CPL_DLL **CSLLoad(
const char *pszFname);
00127
int CPL_DLL CSLSave(
char **papszStrList,
const char *pszFname);
00128
00129
char CPL_DLL **CSLInsertStrings(
char **papszStrList,
int nInsertAtLineNo,
00130
char **papszNewLines);
00131
char CPL_DLL **CSLInsertString(
char **papszStrList,
int nInsertAtLineNo,
00132
char *pszNewLine);
00133
char CPL_DLL **CSLRemoveStrings(
char **papszStrList,
int nFirstLineToDelete,
00134
int nNumToRemove,
char ***ppapszRetStrings);
00135
int CPL_DLL CSLFindString(
char **,
const char * );
00136
int CPL_DLL CSLTestBoolean(
const char *pszValue );
00137
int CPL_DLL CSLFetchBoolean(
char **papszStrList,
const char *pszKey,
00138
int bDefault );
00139
00140
const char CPL_DLL *CPLSPrintf(
char *fmt, ...);
00141
char CPL_DLL **CSLAppendPrintf(
char **papszStrList,
char *fmt, ...);
00142
00143
const char CPL_DLL *
00144 CPLParseNameValue(
const char *pszNameValue,
char **ppszKey );
00145
const char CPL_DLL *
00146 CSLFetchNameValue(
char **papszStrList,
const char *pszName);
00147
char CPL_DLL **
00148 CSLFetchNameValueMultiple(
char **papszStrList,
const char *pszName);
00149
char CPL_DLL **
00150 CSLAddNameValue(
char **papszStrList,
00151
const char *pszName,
const char *pszValue);
00152
char CPL_DLL **
00153 CSLSetNameValue(
char **papszStrList,
00154
const char *pszName,
const char *pszValue);
00155
void CPL_DLL CSLSetNameValueSeparator(
char ** papszStrList,
00156
const char *pszSeparator );
00157
00158
#define CPLES_BackslashQuotable 0
00159
#define CPLES_XML 1
00160
#define CPLES_URL 2
00161
00162
char CPL_DLL *CPLEscapeString(
const char *pszString,
int nLength,
00163
int nScheme );
00164
char CPL_DLL *CPLUnescapeString(
const char *pszString,
int *pnLength,
00165
int nScheme );
00166
00167 CPL_C_END
00168
00169
#endif