MCPcopy Create free account
hub / github.com/OSGeo/PROJ / c_ify_string

Function c_ify_string

src/apps/projinfo_lib.cpp:222–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220// ---------------------------------------------------------------------------
221
222static std::string c_ify_string(const std::string &str) {
223 std::string out(str);
224 out = replaceAll(out, "\"", "{DOUBLE_QUOTE}");
225 out = replaceAll(out, "\n", "\\n\"\n\"");
226 out = replaceAll(out, "{DOUBLE_QUOTE}", "\\\"");
227 return "\"" + out + "\"";
228}
229
230// ---------------------------------------------------------------------------
231

Callers 1

outputObjectFunction · 0.85

Calls 1

replaceAllFunction · 0.85

Tested by

no test coverage detected