16#ifndef CPL_STRING_H_INCLUDED
17#define CPL_STRING_H_INCLUDED
56void CPL_DLL CPL_STDCALL
CSLDestroy(
char **papszStrList);
58char CPL_DLL **
CSLMerge(
char **papszOrig,
67 const char *pszDelimiter,
71#define CSLT_HONOURSTRINGS 0x0001
73#define CSLT_ALLOWEMPTYTOKENS 0x0002
75#define CSLT_PRESERVEQUOTES 0x0004
77#define CSLT_PRESERVEESCAPES 0x0008
79#define CSLT_STRIPLEADSPACES 0x0010
81#define CSLT_STRIPENDSPACES 0x0020
85char CPL_DLL **
CSLLoad2(
const char *pszFname,
int nMaxLines,
int nMaxCols,
95CSLRemoveStrings(
char **papszStrList,
int nFirstLineToDelete,
int nNumToRemove,
99 const char *pszTarget);
101 const char *pszNeedle);
116 bool *pbUnitSpecified);
120 char **ppszKey,
char chSep);
123 const char *pszName);
126 const char *pszDefault);
128 const char *pszName);
129char CPL_DLL **
CSLAddNameValue(
char **papszStrList,
const char *pszName,
131char CPL_DLL **
CSLSetNameValue(
char **papszStrList,
const char *pszName,
134 const char *pszSeparator);
139#define CPLES_BackslashQuotable 0
150#define CPLES_XML_BUT_QUOTES 5
152#define CPLES_CSV_FORCE_QUOTING 6
183size_t CPL_DLL
CPLStrlcpy(
char *pszDest,
const char *pszSrc,
size_t nDestSize);
184size_t CPL_DLL
CPLStrlcat(
char *pszDest,
const char *pszSrc,
size_t nDestSize);
185size_t CPL_DLL
CPLStrnlen(
const char *pszStr,
size_t nMaxLen);
196#if defined(ALIAS_CPLSNPRINTF_AS_SNPRINTF)
197#define CPLsnprintf snprintf
205#if defined(GDAL_COMPILATION) && !defined(DONT_DEPRECATE_SPRINTF)
235#define CPL_ENC_LOCALE ""
237#define CPL_ENC_UTF8 "UTF-8"
239#define CPL_ENC_UTF16 "UTF-16"
241#define CPL_ENC_UCS2 "UCS-2"
243#define CPL_ENC_UCS4 "UCS-4"
245#define CPL_ENC_ASCII "ASCII"
247#define CPL_ENC_ISO8859_1 "ISO-8859-1"
251void CPL_DLL CPLClearRecodeWarningFlags(
void);
253char CPL_DLL *
CPLRecode(
const char *pszSource,
const char *pszSrcEncoding,
254 const char *pszDstEncoding)
262int CPL_DLL
CPLIsUTF8(
const char *pabyData,
int nLen);
263bool CPL_DLL
CPLIsASCII(
const char *pabyData,
size_t nLen);
269int CPL_DLL
CPLCanRecode(
const char *pszTestStr,
const char *pszSrcEncoding,
277#if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
296#define CPLSTRING_CLASS_DLL
297#define CPLSTRING_METHOD_DLL CPL_DLL
300#define CPLSTRING_CLASS_DLL CPL_DLL
301#define CPLSTRING_METHOD_DLL
306 class CPLSTRING_CLASS_DLL
CPLString :
public std::string
327 CPLString(
const char *pszStr,
size_t n) : std::string(pszStr, n)
332 operator const char *(void)
const
340 return std::string::operator[](i);
346 return std::string::operator[](i);
352 return std::string::operator[](
353 static_cast<std::string::size_type
>(i));
359 return std::string::operator[](
360 static_cast<std::string::size_type
>(i));
374 if (pszValue ==
nullptr)
392 FormatC(
double dfValue, const
char *pszFormat =
nullptr);
394 CPLSTRING_METHOD_DLL
CPLString &Recode(const
char *pszSrcEncoding,
395 const
char *pszDstEncoding);
396 CPLSTRING_METHOD_DLL
CPLString &replaceAll(const std::
string &osBefore,
397 const std::
string &osAfter);
398 CPLSTRING_METHOD_DLL
CPLString &replaceAll(const std::
string &osBefore,
400 CPLSTRING_METHOD_DLL
CPLString &replaceAll(
char chBefore,
401 const std::
string &osAfter);
402 CPLSTRING_METHOD_DLL
CPLString &replaceAll(
char chBefore,
char chAfter);
405 CPLSTRING_METHOD_DLL
size_t ifind(const std::
string &str,
406 size_t pos = 0) const;
407 CPLSTRING_METHOD_DLL
size_t ifind(const
char *s,
size_t pos = 0) const;
408 CPLSTRING_METHOD_DLL
CPLString &toupper(
void);
409 CPLSTRING_METHOD_DLL
CPLString &tolower(
void);
411 CPLSTRING_METHOD_DLL
bool endsWith(const std::
string &osStr) const;
414#undef CPLSTRING_CLASS_DLL
415#undef CPLSTRING_METHOD_DLL
428 const
char *pszValue);
437 char **papszList =
nullptr;
438 mutable int nCount = 0;
439 mutable int nAllocation = 0;
440 bool bOwnList =
false;
441 bool bIsSorted =
false;
443 bool MakeOurOwnCopy();
444 bool EnsureAllocation(
int nMaxLength);
445 int FindSortedInsertionPoint(
const char *pszLine);
449 explicit CPLStringList(
char **papszList,
int bTakeOwnership = TRUE);
451 explicit CPLStringList(
const std::vector<std::string> &aosList);
452 explicit CPLStringList(std::initializer_list<const char *> oInitList);
486 return InsertStringDirectly(nInsertAtLineNo, CPLStrdup(pszNewLine));
499 return CSLFindString(papszList, pszTarget);
506 return CSLPartialFindString(papszList, pszNeedle);
509 int FindName(
const char *pszName)
const;
510 bool FetchBool(
const char *pszKey,
bool bDefault)
const;
512 int FetchBoolean(
const char *pszKey,
int bDefault)
const;
513 const char *FetchNameValue(
const char *pszKey)
const;
514 const char *FetchNameValueDef(
const char *pszKey,
515 const char *pszDefault)
const;
516 CPLStringList &AddNameValue(
const char *pszKey,
const char *pszValue);
517 CPLStringList &SetNameValue(
const char *pszKey,
const char *pszValue);
519 CPLStringList &Assign(
char **papszListIn,
int bTakeOwnership = TRUE);
524 return Assign(papszListIn, TRUE);
535 char *operator[](
int i);
540 return (*
this)[
static_cast<int>(i)];
544 const char *operator[](
int i)
const;
549 return (*
this)[
static_cast<int>(i)];
555 return FetchNameValue(pszKey);
565 inline const char *
back()
const
567 return papszList[size() - 1];
573 return papszList ? &papszList[0] :
nullptr;
577 const char *
const *
end()
const
579 return papszList ? &papszList[size()] :
nullptr;
605 operator char **(void)
617 operator std::vector<std::string>(
void)
const
619 return std::vector<std::string>{
begin(),
end()};
623#ifdef GDAL_COMPILATION
630 struct CPL_DLL CSLDestroyReleaser
632 void operator()(
char **papszStr)
const
634 CSLDestroy(papszStr);
641 using CSLUniquePtr = std::unique_ptr<char *, CSLDestroyReleaser>;
645 using CPLCharUniquePtr = std::unique_ptr<char, VSIFreeReleaser>;
652 struct CPL_DLL CSLIterator
654 using iterator_category = std::input_iterator_tag;
655 using difference_type = std::ptrdiff_t;
656 using value_type =
const char *;
657 using pointer = value_type *;
658 using reference = value_type &;
661 bool m_bAtEnd =
false;
663 inline const char *operator*()
const
668 inline CSLIterator &operator++()
675 bool operator==(
const CSLIterator &other)
const;
677 inline bool operator!=(
const CSLIterator &other)
const
679 return !(operator==(other));
689 struct CPL_DLL CSLIteratorWrapper
693 inline explicit CSLIteratorWrapper(
CSLConstList papszList)
694 : m_papszList(papszList)
699 inline CSLIterator
begin()
const
701 return {m_papszList,
false};
705 inline CSLIterator
end()
const
707 return {m_papszList,
true};
718 inline CSLIteratorWrapper Iterate(
CSLConstList papszList)
720 return CSLIteratorWrapper{papszList};
724 inline CSLIteratorWrapper Iterate(
const CPLStringList &aosList)
726 return Iterate(aosList.
List());
732 inline CSLIteratorWrapper Iterate(
char **) =
delete;
738 struct CPL_DLL CSLNameValueIterator
740 using iterator_category = std::input_iterator_tag;
741 using difference_type = std::ptrdiff_t;
742 using value_type = std::pair<const char *, const char *>;
743 using pointer = value_type *;
744 using reference = value_type &;
747 bool m_bReturnNullKeyIfNotNameValue =
false;
748 std::string m_osKey{};
750 value_type operator*();
752 inline CSLNameValueIterator &operator++()
759 inline bool operator==(
const CSLNameValueIterator &other)
const
761 return m_papszList == other.m_papszList;
764 inline bool operator!=(
const CSLNameValueIterator &other)
const
766 return !(operator==(other));
783 struct CPL_DLL CSLNameValueIteratorWrapper
787 inline explicit CSLNameValueIteratorWrapper(
788 CSLConstList papszList,
bool bReturnNullKeyIfNotNameValue)
789 : m_papszList(papszList),
790 m_bReturnNullKeyIfNotNameValue(bReturnNullKeyIfNotNameValue)
795 inline CSLNameValueIterator
begin()
const
797 return {m_papszList, m_bReturnNullKeyIfNotNameValue};
801 CSLNameValueIterator
end()
const;
805 const bool m_bReturnNullKeyIfNotNameValue;
824 inline CSLNameValueIteratorWrapper
826 bool bReturnNullKeyIfNotNameValue =
false)
828 return CSLNameValueIteratorWrapper{papszList,
829 bReturnNullKeyIfNotNameValue};
833 inline CSLNameValueIteratorWrapper
835 bool bReturnNullKeyIfNotNameValue =
false)
837 return IterateNameValue(aosList.
List(), bReturnNullKeyIfNotNameValue);
843 inline CSLIteratorWrapper IterateNameValue(
char **,
bool =
false) =
delete;
848 inline std::vector<std::string> ToVector(
CSLConstList papszList)
853 inline std::vector<std::string> ToVector(
char **) =
delete;
String list class designed around our use of C "char**" string lists.
Definition cpl_string.h:436
const char * operator[](size_t i) const
Return string at specified index.
Definition cpl_string.h:547
const char * operator[](const char *pszKey) const
Return value corresponding to pszKey, or nullptr.
Definition cpl_string.h:553
int IsSorted() const
Returns whether the list is sorted.
Definition cpl_string.h:599
bool empty() const
Return whether the list is empty.
Definition cpl_string.h:476
const char *const * end() const
end() implementation
Definition cpl_string.h:577
CPLStringList & operator=(CSLConstList papszListIn)
Assignment operator.
char ** List()
Return list.
Definition cpl_string.h:583
void clear()
Clear the list.
Definition cpl_string.h:462
CPLStringList & InsertString(int nInsertAtLineNo, const char *pszNewLine)
Insert into the list at identified location.
Definition cpl_string.h:484
CPLStringList & operator=(char **papszListIn)
Assignment operator.
Definition cpl_string.h:522
char * operator[](size_t i)
Return string at specified index.
Definition cpl_string.h:538
int size() const
Return size of list.
Definition cpl_string.h:468
CSLConstList List() const
Return list.
Definition cpl_string.h:589
const char * front() const
Return first element.
Definition cpl_string.h:559
const char *const * begin() const
begin() implementation
Definition cpl_string.h:571
int FindString(const char *pszTarget) const
Return index of pszTarget in the list, or -1.
Definition cpl_string.h:497
const char * back() const
Return last element.
Definition cpl_string.h:565
static const CPLStringList BoundToConstList(CSLConstList papszList)
Return a CPLStringList that wraps the passed list.
Definition cplstringlist.cpp:158
int PartialFindString(const char *pszNeedle) const
Return index of pszTarget in the list (using partial search), or -1.
Definition cpl_string.h:504
Convenient string class based on std::string.
Definition cpl_string.h:307
void Clear()
Clear the string.
Definition cpl_string.h:364
CPLString(void)
Constructor.
Definition cpl_string.h:310
const char & operator[](std::string::size_type i) const
Return character at specified index.
Definition cpl_string.h:344
CPLString(const std::string &oStr)
Constructor.
Definition cpl_string.h:316
void Seize(char *pszValue)
Assign specified string and take ownership of it (assumed to be allocated with CPLMalloc()).
Definition cpl_string.h:372
char & operator[](int i)
Return character at specified index.
Definition cpl_string.h:350
const char & operator[](int i) const
Return character at specified index.
Definition cpl_string.h:357
char & operator[](std::string::size_type i)
Return character at specified index.
Definition cpl_string.h:338
CPLString(const char *pszStr, size_t n)
Constructor.
Definition cpl_string.h:327
CPLString(const char *pszStr)
Constructor.
Definition cpl_string.h:322
Various convenience functions for CPL.
#define CPLFree
Alias of VSIFree()
Definition cpl_conv.h:82
CPL error handling services.
CPLErr
Error category.
Definition cpl_error.h:37
#define CPL_SCAN_FUNC_FORMAT(format_idx, arg_idx)
Tag a function to have scanf() formatting.
Definition cpl_port.h:940
#define CPL_C_END
Macro to end a block of C symbols.
Definition cpl_port.h:283
#define CPL_C_START
Macro to start a block of C symbols.
Definition cpl_port.h:279
#define CPL_FORMAT_STRING(arg)
Macro into which to wrap the format argument of a printf-like function.
Definition cpl_port.h:954
#define CPL_RETURNS_NONNULL
Qualifier for a function that does not return NULL.
Definition cpl_port.h:1002
#define CPL_PRINT_FUNC_FORMAT(format_idx, arg_idx)
Tag a function to have printf() formatting.
Definition cpl_port.h:938
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1179
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition cpl_port.h:964
#define CPL_SCANF_FORMAT_STRING(arg)
Macro into which to wrap the format argument of a sscanf-like function.
Definition cpl_port.h:956
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:169
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition cpl_port.h:199
int CSLFindStringCaseSensitive(CSLConstList papszList, const char *pszTarget)
Find a string within a string list(case sensitive)
Definition cpl_string.cpp:689
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:1131
char * CPLEscapeString(const char *pszString, int nLength, int nScheme)
Apply escaping to string to preserve special characters.
Definition cpl_string.cpp:2202
char * CPLBinaryToHex(int nBytes, const GByte *pabyData)
Binary to hexadecimal translation.
Definition cpl_string.cpp:2776
char ** CSLTokenizeStringComplex(const char *pszString, const char *pszDelimiter, int bHonourStrings, int bAllowEmptyTokens)
Obsolete tokenizing api.
Definition cpl_string.cpp:752
int CPLprintf(const char *fmt,...)
printf() wrapper that is not sensitive to LC_NUMERIC settings.
Definition cpl_string.cpp:1406
int CPLBase64DecodeInPlace(GByte *pszBase64)
Decode base64 string "pszBase64" (null terminated) in place.
Definition cpl_base64.cpp:90
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:2004
CPLString CPLQuotedSQLIdentifier(const char *pszIdent)
Return a CPLString of the SQL quoted identifier.
Definition cplstring.cpp:512
CPLString CPLOPrintf(const char *pszFormat,...)
Return a CPLString with the content of sprintf()
Definition cplstring.cpp:480
size_t CPLStrlcat(char *pszDest, const char *pszSrc, size_t nDestSize)
Appends a source string to a destination buffer.
Definition cpl_string.cpp:3062
int CSLPrint(CSLConstList papszStrList, FILE *fpOut)
Print a StringList to fpOut.
Definition cpl_string.cpp:446
char * CPLForceToASCII(const char *pabyData, int nLen, char chReplacementChar)
Return a new string that is made only of ASCII characters.
Definition cpl_recode.cpp:300
char ** CSLTokenizeString2(const char *pszString, const char *pszDelimiter, int nCSLTFlags)
Tokenize a string.
Definition cpl_string.cpp:819
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:398
size_t CPLStrlcpy(char *pszDest, const char *pszSrc, size_t nDestSize)
Copy source string to a destination buffer.
Definition cpl_string.cpp:3005
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:1685
char * CPLRecodeFromWChar(const wchar_t *pwszSource, const char *pszSrcEncoding, const char *pszDstEncoding)
Convert wchar_t string to UTF-8.
Definition cpl_recode.cpp:165
int CPLsnprintf(char *str, size_t size, const char *fmt,...)
snprintf() wrapper that is not sensitive to LC_NUMERIC settings.
Definition cpl_string.cpp:1351
bool CPLIsASCII(const char *pabyData, size_t nLen)
Test if a string is encoded as ASCII.
Definition cpl_recode.cpp:263
CPLValueType
Type of value.
Definition cpl_string.h:172
@ CPL_VALUE_INTEGER
Integer.
Definition cpl_string.h:175
@ CPL_VALUE_STRING
String.
Definition cpl_string.h:173
@ CPL_VALUE_REAL
Real number.
Definition cpl_string.h:174
void CSLDestroy(char **papszStrList)
Free string list.
Definition cpl_string.cpp:185
bool CPLFetchBool(CSLConstList papszStrList, const char *pszKey, bool bDefault)
Check for boolean key value.
Definition cpl_string.cpp:1614
int CSLFindName(CSLConstList papszStrList, const char *pszName)
Find StringList entry with given key name.
Definition cpl_string.cpp:1717
CPLErr CPLParseMemorySize(const char *pszValue, GIntBig *pnValue, bool *pbUnitSpecified)
Parse a memory size from a string.
Definition cpl_string.cpp:1758
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:1039
const char * CPLParseNameValueSep(const char *pszNameValue, char **ppszKey, char chSep)
Parse NAME<Sep>VALUE string into name and value components.
Definition cpl_string.cpp:1921
int CPLTolower(int c)
Converts a (ASCII) uppercase character to lowercase.
Definition cpl_string.cpp:3151
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:1194
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:158
int CSLFindString(CSLConstList papszList, const char *pszTarget)
Find a string within a string list (case insensitive).
Definition cpl_string.cpp:655
int CSLSave(CSLConstList papszStrList, const char *pszFname)
Write a StringList to a text file.
Definition cpl_string.cpp:397
bool CPLTestBool(const char *pszValue)
Test what boolean value contained in the string.
Definition cpl_string.cpp:1542
char ** CSLParseCommandLine(const char *pszCommandLine)
Tokenize command line arguments in a list of strings.
Definition cpl_string.cpp:3121
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:1658
int CSLCount(CSLConstList papszStrList)
Return number of items in a string list.
Definition cpl_string.cpp:132
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:68
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:3097
char * CPLUTF8ForceToASCII(const char *pszStr, char chReplacementChar)
Return a new string that is made only of ASCII characters.
Definition cpl_recode.cpp:351
char ** CSLInsertString(char **papszStrList, int nInsertAtLineNo, const char *pszNewLine)
Insert a string at a given line number inside a StringList.
Definition cpl_string.cpp:547
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:2124
int CPLIsUTF8(const char *pabyData, int nLen)
Test if a string is encoded as UTF-8.
Definition cpl_recode_stub.cpp:502
int CSLPartialFindString(CSLConstList papszHaystack, const char *pszNeedle)
Find a substring within a string list.
Definition cpl_string.cpp:721
char ** CSLTokenizeString(const char *pszString)
Tokenizes a string and returns a StringList with one string for each token.
Definition cpl_string.cpp:742
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:1969
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:2869
char ** CSLSetNameValue(char **papszStrList, const char *pszName, const char *pszValue)
Assign value to name in StringList.
Definition cpl_string.cpp:2043
char ** CSLRemoveStrings(char **papszStrList, int nFirstLineToDelete, int nNumToRemove, char ***ppapszRetStrings)
Remove strings inside a StringList.
Definition cpl_string.cpp:573
char ** CSLLoad(const char *pszFname)
Load a text file into a string list.
Definition cpl_string.cpp:382
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:80
char ** CSLLoad2(const char *pszFname, int nMaxLines, int nMaxCols, CSLConstList papszOptions)
Load a text file into a string list.
Definition cpl_string.cpp:306
CPLString CPLURLAddKVP(const char *pszURL, const char *pszKey, const char *pszValue)
Return a new URL with a new key=value pair.
Definition cplstring.cpp:431
int CSLFetchBoolean(CSLConstList papszStrList, const char *pszKey, int bDefault)
DEPRECATED.
Definition cpl_string.cpp:1647
int CPLStrlenUTF8(const char *pszUTF8Str)
Return the number of UTF-8 characters of a nul-terminated string.
Definition cpl_recode.cpp:1168
char ** CSLAppendPrintf(char **papszStrList, const char *fmt,...)
Use CPLSPrintf() to append a new line at the end of a StringList.
Definition cpl_string.cpp:1020
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:482
CPLString CPLOvPrintf(const char *pszFormat, va_list args)
Return a CPLString with the content of vsprintf()
Definition cplstring.cpp:499
char ** CSLDuplicate(CSLConstList papszStrList)
Clone a string list.
Definition cpl_string.cpp:213
const char * CPLParseNameValue(const char *pszNameValue, char **ppszKey)
Parse NAME=VALUE string into name and value components.
Definition cpl_string.cpp:1874
int CSLTestBoolean(const char *pszValue)
Test what boolean value contained in the string.
Definition cpl_string.cpp:1567
const char * CPLSPrintf(const char *fmt,...)
CPLSPrintf() that works with 10 static buffer.
Definition cpl_string.cpp:967
int CPLToupper(int c)
Converts a (ASCII) lowercase character to uppercase.
Definition cpl_string.cpp:3136
GByte * CPLHexToBinary(const char *pszHex, int *pnBytes)
Hexadecimal to binary translation.
Definition cpl_string.cpp:2830
char ** CSLMerge(char **papszOrig, CSLConstList papszOverride)
Merge two lists.
Definition cpl_string.cpp:258
char ** CSLAddStringMayFail(char **papszStrList, const char *pszNewString)
Same as CSLAddString() but may return NULL in case of (memory) failure.
Definition cpl_string.cpp:77
int CPLEncodingCharSize(const char *pszEncoding)
Return bytes per character for encoding.
Definition cpl_recode.cpp:1122
char * CPLUnescapeString(const char *pszString, int *pnLength, int nScheme)
Unescape a string.
Definition cpl_string.cpp:2552
char * CPLBase64Encode(int nBytes, const GByte *pabyData)
Base64 encode a buffer.
Definition cpl_base64.cpp:196
int CPLTestBoolean(const char *pszValue)
Test what boolean value contained in the string.
Definition cpl_string.cpp:1589
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:222
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition ogrsf_frmts.h:421
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition ogrsf_frmts.h:429