MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / ToHex

Method ToHex

src/Nazara/Core/ByteArray.cpp:21–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19 */
20
21 String ByteArray::ToHex() const
22 {
23 std::size_t length = m_array.size() * 2;
24
25 String hexOutput(length, '\0');
26 for (std::size_t i = 0; i < m_array.size(); ++i)
27 std::sprintf(&hexOutput[i * 2], "%02x", m_array[i]);
28
29 return hexOutput;
30 }
31
32 /*!
33 * \brief Output operator

Callers 2

ByteArray.cppFile · 0.80
AlgorithmCore.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected