MCPcopy Create free account
hub / github.com/OSGeo/gdal / CSLAddString

Function CSLAddString

port/cpl_string.cpp:68–74  ·  view source on GitHub ↗

Append a string to a StringList and return a pointer to the modified * StringList. * * If the input StringList is NULL, then a new StringList is created. * Note that CSLAddString performance when building a list is in O(n^2) * which can cause noticeable slow down when n > 10000. */

Source from the content-addressed store, hash-verified

66 * which can cause noticeable slow down when n > 10000.
67 */
68char **CSLAddString(char **papszStrList, const char *pszNewString)
69{
70 char **papszRet = CSLAddStringMayFail(papszStrList, pszNewString);
71 if (papszRet == nullptr && pszNewString != nullptr)
72 abort();
73 return papszRet;
74}
75
76/** Same as CSLAddString() but may return NULL in case of (memory) failure */
77char **CSLAddStringMayFail(char **papszStrList, const char *pszNewString)

Callers 15

AddStyleMethod · 0.85
FieldCollectorMethod · 0.85
AddHTTPOptionsMethod · 0.85
RunPOSTMethod · 0.85
RunDELETEMethod · 0.85
RunGETMethod · 0.85
ICreateFeatureMethod · 0.85
ISetFeatureMethod · 0.85
WriteCoreMethod · 0.85

Calls 1

CSLAddStringMayFailFunction · 0.85

Tested by 3

TESTFunction · 0.68
MAIN_STARTFunction · 0.68
TestOGRLayerIgnoreFieldsFunction · 0.68