MCPcopy Create free account
hub / github.com/Icinga/icinga2 / EscapeIcingaString

Method EscapeIcingaString

lib/base/configwriter.cpp:194–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194String ConfigWriter::EscapeIcingaString(const String& str)
195{
196 String result = str;
197 boost::algorithm::replace_all(result, "\\", "\\\\");
198 boost::algorithm::replace_all(result, "\n", "\\n");
199 boost::algorithm::replace_all(result, "\t", "\\t");
200 boost::algorithm::replace_all(result, "\r", "\\r");
201 boost::algorithm::replace_all(result, "\b", "\\b");
202 boost::algorithm::replace_all(result, "\f", "\\f");
203 boost::algorithm::replace_all(result, "\"", "\\\"");
204 return result;
205}
206
207const std::vector<String>& ConfigWriter::GetKeywords()
208{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected