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

Function ArrayToString

src/test/arith_uint256_tests.cpp:57–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56const arith_uint256 HalfL = (OneL << 255);
57static std::string ArrayToString(const unsigned char A[], unsigned int width)
58{
59 std::stringstream Stream;
60 Stream << std::hex;
61 for (unsigned int i = 0; i < width; ++i)
62 {
63 Stream<<std::setw(2)<<std::setfill('0')<<(unsigned int)A[width-i-1];
64 }
65 return Stream.str();
66}
67
68BOOST_AUTO_TEST_CASE( basics ) // constructors, equality, inequality
69{

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.70

Calls 1

strMethod · 0.80

Tested by

no test coverage detected