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

Function escape

cpp/testapps/cppWindowsRunnerGame/main.cpp:70–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

processRequestsFunction · 0.70

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected