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

Function SanitizeString

src/util/strencodings.cpp:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27};
28
29std::string SanitizeString(std::string_view str, int rule)
30{
31 std::string result;
32 for (char c : str) {
33 if (SAFE_CHARS[rule].find(c) != std::string::npos) {
34 result.push_back(c);
35 }
36 }
37 return result;
38}
39
40bool IsHex(std::string_view str)
41{

Callers 12

rest_blockhash_by_heightFunction · 0.85
add_onion_cbMethod · 0.85
authchallenge_cbMethod · 0.85
ProcessMessageMethod · 0.85
ProcessMessagesMethod · 0.85
AppInitMainFunction · 0.85
readHeaderMethod · 0.85
GetReceivedMessageMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGETFunction · 0.85
parseMethod · 0.85
AlertNotifyFunction · 0.85

Calls 2

findMethod · 0.80
push_backMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGETFunction · 0.68