📄 cplstring.h
字号:
#ifndef _CPL_STRING_H_INCLUDED#define _CPL_STRING_H_INCLUDED#include "CplVsi.h"#include "CplError.h"#include "CplConv.h"/** * \file cpl_string.h * * Various convenience functions for working with strings and string lists. * * A StringList is just an array of strings with the last pointer being * NULL. An empty StringList may be either a NULL pointer, or a pointer to * a pointer memory location with a NULL value. * * A common convention for StringLists is to use them to store name/value * lists. In this case the contents are treated like a dictionary of * name/value pairs. The actual data is formatted with each string having * the format "<name>:<value>" (though "=" is also an acceptable separator). * A number of the functions in the file operate on name/value style * string lists (such as CSLSetNameValue(), and CSLFetchNameValue()). * */CPL_C_STARTchar CPL_DLL **CSLAddString(char **papszStrList, const char *pszNewString);int CPL_DLL CSLCount(char **papszStrList);const char CPL_DLL *CSLGetField( char **, int );void CPL_DLL CSLDestroy(char **papszStrList);char CPL_DLL **CSLDuplicate(char **papszStrList);char CPL_DLL **CSLTokenizeString(const char *pszString );char CPL_DLL **CSLTokenizeStringComplex(const char *pszString, const char *pszDelimiter, int bHonourStrings, int bAllowEmptyTokens );char CPL_DLL **CSLTokenizeString2( const char *pszString, const char *pszDelimeter, int nCSLTFlags );#define CSLT_HONOURSTRINGS 0x0001#define CSLT_ALLOWEMPTYTOKENS 0x0002#define CSLT_PRESERVEQUOTES 0x0004#define CSLT_PRESERVEESCAPES 0x0008int CPL_DLL CSLPrint(char **papszStrList, FILE *fpOut);char CPL_DLL **CSLLoad(const char *pszFname);int CPL_DLL CSLSave(char **papszStrList, const char *pszFname);char CPL_DLL **CSLInsertStrings(char **papszStrList, int nInsertAtLineNo, char **papszNewLines);char CPL_DLL **CSLInsertString(char **papszStrList, int nInsertAtLineNo, char *pszNewLine);char CPL_DLL **CSLRemoveStrings(char **papszStrList, int nFirstLineToDelete, int nNumToRemove, char ***ppapszRetStrings);int CPL_DLL CSLFindString( char **, const char * );int CPL_DLL CSLTestBoolean( const char *pszValue );int CPL_DLL CSLFetchBoolean( char **papszStrList, const char *pszKey, int bDefault );const char CPL_DLL *CPLSPrintf(char *fmt, ...);char CPL_DLL **CSLAppendPrintf(char **papszStrList, char *fmt, ...);const char CPL_DLL * CPLParseNameValue(const char *pszNameValue, char **ppszKey );const char CPL_DLL * CSLFetchNameValue(char **papszStrList, const char *pszName);char CPL_DLL ** CSLFetchNameValueMultiple(char **papszStrList, const char *pszName);char CPL_DLL ** CSLAddNameValue(char **papszStrList, const char *pszName, const char *pszValue);char CPL_DLL ** CSLSetNameValue(char **papszStrList, const char *pszName, const char *pszValue);void CPL_DLL CSLSetNameValueSeparator( char ** papszStrList, const char *pszSeparator );#define CPLES_BackslashQuotable 0#define CPLES_XML 1#define CPLES_URL 2 /* unescape only for now */char CPL_DLL *CPLEscapeString( const char *pszString, int nLength, int nScheme );char CPL_DLL *CPLUnescapeString( const char *pszString, int *pnLength, int nScheme );CPL_C_END#endif /* _CPL_STRING_H_INCLUDED */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -