MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / SanitizeString

Function SanitizeString

src/rpc/core/httpserver.cpp:66–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64};
65
66std::string SanitizeString(const std::string& str, SafeCharsRule rule) {
67 std::string strResult;
68 for (std::string::size_type i = 0; i < str.size(); i++) {
69 if (SAFE_CHARS[rule].find(str[i]) != std::string::npos) strResult.push_back(str[i]);
70 }
71 return strResult;
72}
73
74/** HTTP request work item */
75class HTTPWorkItem final : public HTTPClosure {

Callers 1

http_request_cbFunction · 0.70

Calls 3

push_backMethod · 0.80
sizeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected