MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / EncodeDumpString

Function EncodeDumpString

src/wallet/rpcdump.cpp:42–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42std::string static EncodeDumpString(const std::string &str) {
43 std::stringstream ret;
44 for (unsigned char c : str) {
45 if (c <= 32 || c >= 128 || c == '%') {
46 ret << '%' << HexStr(&c, &c + 1);
47 } else {
48 ret << c;
49 }
50 }
51 return ret.str();
52}
53
54static std::string DecodeDumpString(const std::string &str) {
55 std::stringstream ret;

Callers 1

GetWalletAddressesForKeyFunction · 0.85

Calls 2

HexStrFunction · 0.85
strMethod · 0.80

Tested by

no test coverage detected