MCPcopy Create free account
hub / github.com/Kitware/VTK / unquote_string

Function unquote_string

ThirdParty/libproj/vtklibproj/src/param.cpp:12–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include "proj_internal.h"
11
12static void unquote_string(char* param_str) {
13
14 size_t len = strlen(param_str);
15 // Remove leading and terminating spaces after equal sign
16 const char* equal = strstr(param_str, "=\"");
17 if( equal && equal - param_str + 1 > 2 && param_str[len-1] == '"' ) {
18 size_t dst = equal + 1 - param_str;
19 size_t src = dst + 1;
20 for( ; param_str[src]; dst++, src++)
21 {
22 if( param_str[src] == '"' ) {
23 if( param_str[src+1] == '"' ) {
24 src++;
25 } else {
26 break;
27 }
28 }
29 param_str[dst] = param_str[src];
30 }
31 param_str[dst] = '\0';
32 }
33
34}
35
36
37/* create parameter list entry */

Callers 2

pj_mkparamFunction · 0.85
pj_mkparam_wsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected