32 #ifndef CPL_STRING_H_INCLUDED
33 #define CPL_STRING_H_INCLUDED
72 void CPL_DLL CPL_STDCALL
CSLDestroy(
char **papszStrList);
74 char CPL_DLL **
CSLMerge(
char **papszOrig,
83 const char *pszDelimiter,
87 #define CSLT_HONOURSTRINGS 0x0001
89 #define CSLT_ALLOWEMPTYTOKENS 0x0002
91 #define CSLT_PRESERVEQUOTES 0x0004
93 #define CSLT_PRESERVEESCAPES 0x0008
95 #define CSLT_STRIPLEADSPACES 0x0010
97 #define CSLT_STRIPENDSPACES 0x0020
101 char CPL_DLL **
CSLLoad2(
const char *pszFname,
int nMaxLines,
int nMaxCols,
108 char CPL_DLL **
CSLInsertString(
char **papszStrList,
int nInsertAtLineNo,
111 CSLRemoveStrings(
char **papszStrList,
int nFirstLineToDelete,
int nNumToRemove,
115 const char *pszTarget);
117 const char *pszNeedle);
133 char **ppszKey,
char chSep);
136 const char *pszName);
139 const char *pszDefault);
141 const char *pszName);
142 char CPL_DLL **
CSLAddNameValue(
char **papszStrList,
const char *pszName,
144 char CPL_DLL **
CSLSetNameValue(
char **papszStrList,
const char *pszName,
147 const char *pszSeparator);
152 #define CPLES_BackslashQuotable 0
163 #define CPLES_XML_BUT_QUOTES 5
165 #define CPLES_CSV_FORCE_QUOTING 6
196 size_t CPL_DLL
CPLStrlcpy(
char *pszDest,
const char *pszSrc,
size_t nDestSize);
197 size_t CPL_DLL
CPLStrlcat(
char *pszDest,
const char *pszSrc,
size_t nDestSize);
198 size_t CPL_DLL
CPLStrnlen(
const char *pszStr,
size_t nMaxLen);
209 #if defined(ALIAS_CPLSNPRINTF_AS_SNPRINTF)
210 #define CPLsnprintf snprintf
218 #if defined(GDAL_COMPILATION) && !defined(DONT_DEPRECATE_SPRINTF)
248 #define CPL_ENC_LOCALE ""
250 #define CPL_ENC_UTF8 "UTF-8"
252 #define CPL_ENC_UTF16 "UTF-16"
254 #define CPL_ENC_UCS2 "UCS-2"
256 #define CPL_ENC_UCS4 "UCS-4"
258 #define CPL_ENC_ASCII "ASCII"
260 #define CPL_ENC_ISO8859_1 "ISO-8859-1"
264 void CPL_DLL CPLClearRecodeWarningFlags(
void);
266 char CPL_DLL *
CPLRecode(
const char *pszSource,
const char *pszSrcEncoding,
267 const char *pszDstEncoding)
275 int CPL_DLL
CPLIsUTF8(
const char *pabyData,
int nLen);
276 bool CPL_DLL
CPLIsASCII(
const char *pabyData,
size_t nLen);
282 int CPL_DLL
CPLCanRecode(
const char *pszTestStr,
const char *pszSrcEncoding,
290 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
309 #define CPLSTRING_CLASS_DLL
310 #define CPLSTRING_METHOD_DLL CPL_DLL
313 #define CPLSTRING_CLASS_DLL CPL_DLL
314 #define CPLSTRING_METHOD_DLL
319 class CPLSTRING_CLASS_DLL
CPLString :
public std::string
340 CPLString(
const char *pszStr,
size_t n) : std::string(pszStr, n)
345 operator const char *(void)
const
353 return std::string::operator[](i);
359 return std::string::operator[](i);
365 return std::string::operator[](
366 static_cast<std::string::size_type
>(i));
372 return std::string::operator[](
373 static_cast<std::string::size_type
>(i));
387 if (pszValue ==
nullptr)
405 FormatC(
double dfValue, const
char *pszFormat =
nullptr);
407 CPLSTRING_METHOD_DLL
CPLString &Recode(const
char *pszSrcEncoding,
408 const
char *pszDstEncoding);
409 CPLSTRING_METHOD_DLL
CPLString &replaceAll(const std::
string &osBefore,
410 const std::
string &osAfter);
411 CPLSTRING_METHOD_DLL
CPLString &replaceAll(const std::
string &osBefore,
413 CPLSTRING_METHOD_DLL
CPLString &replaceAll(
char chBefore,
414 const std::
string &osAfter);
415 CPLSTRING_METHOD_DLL
CPLString &replaceAll(
char chBefore,
char chAfter);
418 CPLSTRING_METHOD_DLL
size_t ifind(const std::
string &str,
419 size_t pos = 0) const;
420 CPLSTRING_METHOD_DLL
size_t ifind(const
char *s,
size_t pos = 0) const;
421 CPLSTRING_METHOD_DLL
CPLString &toupper(
void);
422 CPLSTRING_METHOD_DLL
CPLString &tolower(
void);
424 CPLSTRING_METHOD_DLL
bool endsWith(const std::
string &osStr) const;
427 #undef CPLSTRING_CLASS_DLL
428 #undef CPLSTRING_METHOD_DLL
441 const
char *pszValue);
450 char **papszList =
nullptr;
451 mutable int nCount = 0;
452 mutable int nAllocation = 0;
453 bool bOwnList =
false;
454 bool bIsSorted =
false;
456 bool MakeOurOwnCopy();
457 bool EnsureAllocation(
int nMaxLength);
458 int FindSortedInsertionPoint(
const char *pszLine);
462 explicit CPLStringList(
char **papszList,
int bTakeOwnership = TRUE);
464 explicit CPLStringList(
const std::vector<std::string> &aosList);
465 explicit CPLStringList(std::initializer_list<const char *> oInitList);
499 return InsertStringDirectly(nInsertAtLineNo,
CPLStrdup(pszNewLine));
522 int FindName(
const char *pszName)
const;
523 bool FetchBool(
const char *pszKey,
bool bDefault)
const;
525 int FetchBoolean(
const char *pszKey,
int bDefault)
const;
526 const char *FetchNameValue(
const char *pszKey)
const;
527 const char *FetchNameValueDef(
const char *pszKey,
528 const char *pszDefault)
const;
529 CPLStringList &AddNameValue(
const char *pszKey,
const char *pszValue);
530 CPLStringList &SetNameValue(
const char *pszKey,
const char *pszValue);
532 CPLStringList &Assign(
char **papszListIn,
int bTakeOwnership = TRUE);
537 return Assign(papszListIn, TRUE);
548 char *operator[](
int i);
553 return (*
this)[
static_cast<int>(i)];
557 const char *operator[](
int i)
const;
562 return (*
this)[
static_cast<int>(i)];
568 return FetchNameValue(pszKey);
578 inline const char *
back()
const
580 return papszList[size() - 1];
586 return papszList ? &papszList[0] :
nullptr;
590 const char *
const *
end()
const
592 return papszList ? &papszList[size()] :
nullptr;
618 operator char **(void)
630 operator std::vector<std::string>(
void)
const
632 return std::vector<std::string>{
begin(),
end()};
636 #ifdef GDAL_COMPILATION
643 struct CPL_DLL CSLDestroyReleaser
645 void operator()(
char **papszStr)
const
654 using CSLUniquePtr = std::unique_ptr<char *, CSLDestroyReleaser>;
658 using CPLCharUniquePtr = std::unique_ptr<char, VSIFreeReleaser>;
665 struct CPL_DLL CSLIterator
667 using iterator_category = std::input_iterator_tag;
668 using difference_type = std::ptrdiff_t;
669 using value_type =
const char *;
670 using pointer = value_type *;
671 using reference = value_type &;
674 bool m_bAtEnd =
false;
676 inline const char *operator*()
const
681 inline CSLIterator &operator++()
688 bool operator==(
const CSLIterator &other)
const;
690 inline bool operator!=(
const CSLIterator &other)
const
692 return !(operator==(other));
702 struct CPL_DLL CSLIteratorWrapper
706 inline explicit CSLIteratorWrapper(
CSLConstList papszList)
707 : m_papszList(papszList)
712 inline CSLIterator
begin()
const
714 return {m_papszList,
false};
718 inline CSLIterator
end()
const
720 return {m_papszList,
true};
731 inline CSLIteratorWrapper Iterate(
CSLConstList papszList)
733 return CSLIteratorWrapper{papszList};
737 inline CSLIteratorWrapper Iterate(
const CPLStringList &aosList)
739 return Iterate(aosList.
List());
745 inline CSLIteratorWrapper Iterate(
char **) =
delete;
751 struct CPL_DLL CSLNameValueIterator
753 using iterator_category = std::input_iterator_tag;
754 using difference_type = std::ptrdiff_t;
755 using value_type = std::pair<const char *, const char *>;
756 using pointer = value_type *;
757 using reference = value_type &;
760 bool m_bReturnNullKeyIfNotNameValue =
false;
761 std::string m_osKey{};
763 value_type operator*();
765 inline CSLNameValueIterator &operator++()
772 inline bool operator==(
const CSLNameValueIterator &other)
const
774 return m_papszList == other.m_papszList;
777 inline bool operator!=(
const CSLNameValueIterator &other)
const
779 return !(operator==(other));
796 struct CPL_DLL CSLNameValueIteratorWrapper
800 inline explicit CSLNameValueIteratorWrapper(
801 CSLConstList papszList,
bool bReturnNullKeyIfNotNameValue)
802 : m_papszList(papszList),
803 m_bReturnNullKeyIfNotNameValue(bReturnNullKeyIfNotNameValue)
808 inline CSLNameValueIterator
begin()
const
810 return {m_papszList, m_bReturnNullKeyIfNotNameValue};
814 CSLNameValueIterator
end()
const;
818 const bool m_bReturnNullKeyIfNotNameValue;
837 inline CSLNameValueIteratorWrapper
839 bool bReturnNullKeyIfNotNameValue =
false)
841 return CSLNameValueIteratorWrapper{papszList,
842 bReturnNullKeyIfNotNameValue};
846 inline CSLNameValueIteratorWrapper
848 bool bReturnNullKeyIfNotNameValue =
false)
850 return IterateNameValue(aosList.
List(), bReturnNullKeyIfNotNameValue);
856 inline CSLIteratorWrapper IterateNameValue(
char **,
bool =
false) =
delete;
861 inline std::vector<std::string> ToVector(
CSLConstList papszList)
866 inline std::vector<std::string> ToVector(
char **) =
delete;
String list class designed around our use of C "char**" string lists.
Definition: cpl_string.h:449
const char * front() const
Return first element.
Definition: cpl_string.h:572
int IsSorted() const
Returns whether the list is sorted.
Definition: cpl_string.h:612
bool empty() const
Return whether the list is empty.
Definition: cpl_string.h:489
const char * operator[](const char *pszKey) const
Return value corresponding to pszKey, or nullptr.
Definition: cpl_string.h:566
char * operator[](size_t i)
Return string at specified index.
Definition: cpl_string.h:551
void clear()
Clear the list.
Definition: cpl_string.h:475
CPLStringList & operator=(CSLConstList papszListIn)
Assignment operator.
CPLStringList & InsertString(int nInsertAtLineNo, const char *pszNewLine)
Insert into the list at identified location.
Definition: cpl_string.h:497
const char * operator[](size_t i) const
Return string at specified index.
Definition: cpl_string.h:560
const char * back() const
Return last element.
Definition: cpl_string.h:578
CPLStringList & operator=(char **papszListIn)
Assignment operator.
Definition: cpl_string.h:535
char ** List()
Return list.
Definition: cpl_string.h:596
const char *const * begin() const
begin() implementation
Definition: cpl_string.h:584
int size() const
Return size of list.
Definition: cpl_string.h:481
CSLConstList List() const
Return list.
Definition: cpl_string.h:602
const char *const * end() const
end() implementation
Definition: cpl_string.h:590
int FindString(const char *pszTarget) const
Return index of pszTarget in the list, or -1.
Definition: cpl_string.h:510
static const CPLStringList BoundToConstList(CSLConstList papszList)
Return a CPLStringList that wraps the passed list.
Definition: cplstringlist.cpp:174
int PartialFindString(const char *pszNeedle) const
Return index of pszTarget in the list (using partial search), or -1.
Definition: cpl_string.h:517
Convenient string class based on std::string.
Definition: cpl_string.h:320
char & operator[](int i)
Return character at specified index.
Definition: cpl_string.h:363
void Clear()
Clear the string.
Definition: cpl_string.h:377
char & operator[](std::string::size_type i)
Return character at specified index.
Definition: cpl_string.h:351
CPLString(void)
Constructor.
Definition: cpl_string.h:323
CPLString(const std::string &oStr)
Constructor.
Definition: cpl_string.h:329
const char & operator[](std::string::size_type i) const
Return character at specified index.
Definition: cpl_string.h:357
void Seize(char *pszValue)
Assign specified string and take ownership of it (assumed to be allocated with CPLMalloc()).
Definition: cpl_string.h:385
const char & operator[](int i) const
Return character at specified index.
Definition: cpl_string.h:370
CPLString(const char *pszStr, size_t n)
Constructor.
Definition: cpl_string.h:340
CPLString(const char *pszStr)
Constructor.
Definition: cpl_string.h:335
Various convenience functions for CPL.
#define CPLFree
Alias of VSIFree()
Definition: cpl_conv.h:98
char * CPLStrdup(const char *)
Safe version of strdup() function.
Definition: cpl_conv.cpp:310
CPL error handling services.
#define CPL_SCAN_FUNC_FORMAT(format_idx, arg_idx)
Tag a function to have scanf() formatting.
Definition: cpl_port.h:952
#define CPL_C_END
Macro to end a block of C symbols.
Definition: cpl_port.h:299
#define CPL_C_START
Macro to start a block of C symbols.
Definition: cpl_port.h:295
#define CPL_FORMAT_STRING(arg)
Macro into which to wrap the format argument of a printf-like function.
Definition: cpl_port.h:966
#define CPL_RETURNS_NONNULL
Qualifier for a function that does not return NULL.
Definition: cpl_port.h:1014
#define CPL_PRINT_FUNC_FORMAT(format_idx, arg_idx)
Tag a function to have printf() formatting.
Definition: cpl_port.h:950
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1183
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:976
#define CPL_SCANF_FORMAT_STRING(arg)
Macro into which to wrap the format argument of a sscanf-like function.
Definition: cpl_port.h:968
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:185
char ** CSLAppendPrintf(char **papszStrList, const char *fmt,...)
Use CPLSPrintf() to append a new line at the end of a StringList.
Definition: cpl_string.cpp:1035
int CSLFindStringCaseSensitive(CSLConstList papszList, const char *pszTarget)
Find a string within a string list(case sensitive)
Definition: cpl_string.cpp:704
int CPLvsnprintf(char *str, size_t size, const char *fmt, va_list args)
vsnprintf() wrapper that is not sensitive to LC_NUMERIC settings.
Definition: cpl_string.cpp:1146
char * CPLRecode(const char *pszSource, const char *pszSrcEncoding, const char *pszDstEncoding)
Convert a string from a source encoding to a destination encoding.
Definition: cpl_recode.cpp:79
int CPLprintf(const char *fmt,...)
printf() wrapper that is not sensitive to LC_NUMERIC settings.
Definition: cpl_string.cpp:1421
char * CPLRecodeFromWChar(const wchar_t *pwszSource, const char *pszSrcEncoding, const char *pszDstEncoding)
Convert wchar_t string to UTF-8.
Definition: cpl_recode.cpp:180
char ** CSLLoad2(const char *pszFname, int nMaxLines, int nMaxCols, CSLConstList papszOptions)
Load a text file into a string list.
Definition: cpl_string.cpp:321
char ** CSLDuplicate(CSLConstList papszStrList)
Clone a string list.
Definition: cpl_string.cpp:228
int CPLBase64DecodeInPlace(GByte *pszBase64)
Decode base64 string "pszBase64" (null terminated) in place.
Definition: cpl_base64.cpp:90
CPLString CPLQuotedSQLIdentifier(const char *pszIdent)
Return a CPLString of the SQL quoted identifier.
Definition: cplstring.cpp:528
CPLString CPLOPrintf(const char *pszFormat,...)
Return a CPLString with the content of sprintf()
Definition: cplstring.cpp:496
char * CPLForceToASCII(const char *pabyData, int nLen, char chReplacementChar)
Return a new string that is made only of ASCII characters.
Definition: cpl_recode.cpp:315
char ** CSLAddString(char **papszStrList, const char *pszNewString)
Append a string to a StringList and return a pointer to the modified StringList.
Definition: cpl_string.cpp:83
size_t CPLStrlcat(char *pszDest, const char *pszSrc, size_t nDestSize)
Appends a source string to a destination buffer.
Definition: cpl_string.cpp:2961
int CSLPrint(CSLConstList papszStrList, FILE *fpOut)
Print a StringList to fpOut.
Definition: cpl_string.cpp:461
const char * CPLParseNameValue(const char *pszNameValue, char **ppszKey)
Parse NAME=VALUE string into name and value components.
Definition: cpl_string.cpp:1777
char * CPLBase64Encode(int nBytes, const GByte *pabyData)
Base64 encode a buffer.
Definition: cpl_base64.cpp:196
CPLString CPLURLGetValue(const char *pszURL, const char *pszKey)
Return the value matching a key from a key=value pair in a URL.
Definition: cplstring.cpp:414
size_t CPLStrlcpy(char *pszDest, const char *pszSrc, size_t nDestSize)
Copy source string to a destination buffer.
Definition: cpl_string.cpp:2904
char ** CSLAddNameValue(char **papszStrList, const char *pszName, const char *pszValue)
Add a new entry to a StringList of "Name=Value" pairs, ("Name:Value" pairs are also supported for bac...
Definition: cpl_string.cpp:1907
int CPLsnprintf(char *str, size_t size, const char *fmt,...)
snprintf() wrapper that is not sensitive to LC_NUMERIC settings.
Definition: cpl_string.cpp:1366
bool CPLIsASCII(const char *pabyData, size_t nLen)
Test if a string is encoded as ASCII.
Definition: cpl_recode.cpp:278
char ** CSLTokenizeStringComplex(const char *pszString, const char *pszDelimiter, int bHonourStrings, int bAllowEmptyTokens)
Obsolete tokenizing api.
Definition: cpl_string.cpp:767
CPLValueType
Type of value.
Definition: cpl_string.h:185
@ CPL_VALUE_INTEGER
Integer.
Definition: cpl_string.h:188
@ CPL_VALUE_STRING
String.
Definition: cpl_string.h:186
@ CPL_VALUE_REAL
Real number.
Definition: cpl_string.h:187
void CSLDestroy(char **papszStrList)
Free string list.
Definition: cpl_string.cpp:200
bool CPLFetchBool(CSLConstList papszStrList, const char *pszKey, bool bDefault)
Check for boolean key value.
Definition: cpl_string.cpp:1629
int CSLFindName(CSLConstList papszStrList, const char *pszName)
Find StringList entry with given key name.
Definition: cpl_string.cpp:1732
int CPLVASPrintf(char **buf, const char *fmt, va_list args)
This is intended to serve as an easy to use C callable vasprintf() alternative.
Definition: cpl_string.cpp:1054
const char * CPLSPrintf(const char *fmt,...)
CPLSPrintf() that works with 10 static buffer.
Definition: cpl_string.cpp:982
int CPLTolower(int c)
Converts a (ASCII) uppercase character to lowercase.
Definition: cpl_string.cpp:3050
int CPLCanRecode(const char *pszTestStr, const char *pszSrcEncoding, const char *pszDstEncoding)
Checks if it is possible to recode a string from one encoding to another.
Definition: cpl_recode.cpp:1209
const char * CSLFetchNameValueDef(CSLConstList papszStrList, const char *pszName, const char *pszDefault)
Same as CSLFetchNameValue() but return pszDefault in case of no match.
Definition: cpl_string.cpp:1673
char * CPLUnescapeString(const char *pszString, int *pnLength, int nScheme)
Unescape a string.
Definition: cpl_string.cpp:2455
int CSLFindString(CSLConstList papszList, const char *pszTarget)
Find a string within a string list (case insensitive).
Definition: cpl_string.cpp:670
int CSLSave(CSLConstList papszStrList, const char *pszFname)
Write a StringList to a text file.
Definition: cpl_string.cpp:412
bool CPLTestBool(const char *pszValue)
Test what boolean value contained in the string.
Definition: cpl_string.cpp:1557
char ** CSLInsertString(char **papszStrList, int nInsertAtLineNo, const char *pszNewLine)
Insert a string at a given line number inside a StringList.
Definition: cpl_string.cpp:562
int CSLCount(CSLConstList papszStrList)
Return number of items in a string list.
Definition: cpl_string.cpp:147
size_t CPLStrnlen(const char *pszStr, size_t nMaxLen)
Returns the length of a NUL terminated string by reading at most the specified number of bytes.
Definition: cpl_string.cpp:2996
char ** CSLAddStringMayFail(char **papszStrList, const char *pszNewString)
Same as CSLAddString() but may return NULL in case of (memory) failure.
Definition: cpl_string.cpp:92
char ** CSLSetNameValue(char **papszStrList, const char *pszName, const char *pszValue)
Assign value to name in StringList.
Definition: cpl_string.cpp:1946
const char * CSLFetchNameValue(CSLConstList papszStrList, const char *pszName)
In a StringList of "Name=Value" pairs, look for the first value associated with the specified name.
Definition: cpl_string.cpp:1700
void CSLSetNameValueSeparator(char **papszStrList, const char *pszSeparator)
Replace the default separator (":" or "=") with the passed separator in the given name/value list.
Definition: cpl_string.cpp:2027
int CPLIsUTF8(const char *pabyData, int nLen)
Test if a string is encoded as UTF-8.
Definition: cpl_recode_stub.cpp:446
char ** CSLParseCommandLine(const char *pszCommandLine)
Tokenize command line arguments in a list of strings.
Definition: cpl_string.cpp:3020
int CSLPartialFindString(CSLConstList papszHaystack, const char *pszNeedle)
Find a substring within a string list.
Definition: cpl_string.cpp:736
GByte * CPLHexToBinary(const char *pszHex, int *pnBytes)
Hexadecimal to binary translation.
Definition: cpl_string.cpp:2733
CPLValueType CPLGetValueType(const char *pszValue)
Detect the type of the value contained in a string, whether it is a real, an integer or a string Lead...
Definition: cpl_string.cpp:2772
char ** CSLInsertStrings(char **papszStrList, int nInsertAtLineNo, CSLConstList papszNewLines)
Copies the contents of a StringList inside another StringList before the specified line.
Definition: cpl_string.cpp:497
CPLString CPLURLAddKVP(const char *pszURL, const char *pszKey, const char *pszValue)
Return a new URL with a new key=value pair.
Definition: cplstring.cpp:447
char ** CSLFetchNameValueMultiple(CSLConstList papszStrList, const char *pszName)
In a StringList of "Name=Value" pairs, look for all the values with the specified name.
Definition: cpl_string.cpp:1872
int CSLFetchBoolean(CSLConstList papszStrList, const char *pszKey, int bDefault)
DEPRECATED.
Definition: cpl_string.cpp:1662
int CPLStrlenUTF8(const char *pszUTF8Str)
Return the number of UTF-8 characters of a nul-terminated string.
Definition: cpl_recode.cpp:1183
CPLString CPLOvPrintf(const char *pszFormat, va_list args)
Return a CPLString with the content of vsprintf()
Definition: cplstring.cpp:515
char ** CSLLoad(const char *pszFname)
Load a text file into a string list.
Definition: cpl_string.cpp:397
char ** CSLTokenizeString2(const char *pszString, const char *pszDelimiter, int nCSLTFlags)
Tokenize a string.
Definition: cpl_string.cpp:834
wchar_t * CPLRecodeToWChar(const char *pszSource, const char *pszSrcEncoding, const char *pszDstEncoding)
Convert UTF-8 string to a wchar_t string.
Definition: cpl_recode.cpp:237
int CSLTestBoolean(const char *pszValue)
Test what boolean value contained in the string.
Definition: cpl_string.cpp:1582
char ** CSLTokenizeString(const char *pszString)
Tokenizes a string and returns a StringList with one string for each token.
Definition: cpl_string.cpp:757
const char * CSLGetField(CSLConstList, int)
Fetches the indicated field, being careful not to crash if the field doesn't exist within this string...
Definition: cpl_string.cpp:173
int CPLToupper(int c)
Converts a (ASCII) lowercase character to uppercase.
Definition: cpl_string.cpp:3035
char * CPLUTF8ForceToASCII(const char *pszStr, char chReplacementChar)
Return a new string that is made only of ASCII characters.
Definition: cpl_recode.cpp:366
char * CPLEscapeString(const char *pszString, int nLength, int nScheme)
Apply escaping to string to preserve special characters.
Definition: cpl_string.cpp:2105
char ** CSLMerge(char **papszOrig, CSLConstList papszOverride)
Merge two lists.
Definition: cpl_string.cpp:273
char ** CSLRemoveStrings(char **papszStrList, int nFirstLineToDelete, int nNumToRemove, char ***ppapszRetStrings)
Remove strings inside a StringList.
Definition: cpl_string.cpp:588
char * CPLBinaryToHex(int nBytes, const GByte *pabyData)
Binary to hexadecimal translation.
Definition: cpl_string.cpp:2679
const char * CPLParseNameValueSep(const char *pszNameValue, char **ppszKey, char chSep)
Parse NAME<Sep>VALUE string into name and value components.
Definition: cpl_string.cpp:1824
int CPLEncodingCharSize(const char *pszEncoding)
Return bytes per character for encoding.
Definition: cpl_recode.cpp:1137
int CPLTestBoolean(const char *pszValue)
Test what boolean value contained in the string.
Definition: cpl_string.cpp:1604
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition: ogrsf_frmts.h:434
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition: ogrsf_frmts.h:442