MCPcopy Create free account
hub / github.com/ElementsProject/elements / SanitizeString

Function SanitizeString

src/util/strencodings.cpp:27–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25};
26
27std::string SanitizeString(const std::string& str, int rule)
28{
29 std::string strResult;
30 for (std::string::size_type i = 0; i < str.size(); i++)
31 {
32 if (SAFE_CHARS[rule].find(str[i]) != std::string::npos)
33 strResult.push_back(str[i]);
34 }
35 return strResult;
36}
37
38const signed char p_util_hexdigit[256] =
39{ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,

Callers 13

rest_blockhash_by_heightFunction · 0.85
http_request_cbFunction · 0.85
add_onion_cbMethod · 0.85
authchallenge_cbMethod · 0.85
ProcessMessageMethod · 0.85
ProcessMessagesMethod · 0.85
AppInitMainFunction · 0.85
AlertNotifyFunction · 0.85
readHeaderMethod · 0.85
GetMessageMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGETFunction · 0.85

Calls 3

findMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGETFunction · 0.68