MCPcopy Create free account
hub / github.com/avast/retdec / hexToBig

Method hexToBig

src/utils/byte_value_storage.cpp:168–182  ·  view source on GitHub ↗

* Convert hexadecimal string to big endian * * @param str String which will be converted * * @return @c true if conversion went OK, @c false otherwise */

Source from the content-addressed store, hash-verified

166 * @return @c true if conversion went OK, @c false otherwise
167 */
168bool ByteValueStorage::hexToBig(std::string& str) const
169{
170 if (isUnknownEndian())
171 {
172 return false;
173 }
174
175 return isBigEndian()
176 ? true
177 : swapEndianness(
178 str,
179 getBytesPerWord(),
180 getNumberOfNibblesInByte()
181 );
182}
183
184/**
185 * Convert hexadecimal string to little endian

Callers 1

TEST_FFunction · 0.80

Calls 1

swapEndiannessFunction · 0.85

Tested by 1

TEST_FFunction · 0.64