MCPcopy Create free account
hub / github.com/PlayFab/gsdk / escape

Function escape

cpp/testapps/cppLinuxRunnerGame/main.cpp:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66std::string escape(std::string const &s)
67{
68 std::size_t n = s.length();
69 std::string escaped;
70 escaped.reserve(n * 2);
71
72 for (std::size_t i = 0; i < n; ++i) {
73 if (s[i] == '\\' || s[i] == '\"')
74 escaped += '\\';
75 escaped += s[i];
76 }
77 return escaped;
78}
79
80void processRequests()
81{

Callers 1

processRequestsFunction · 0.70

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected