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

Function widthOf

src/utils/string.cpp:73–76  ·  view source on GitHub ↗

* @brief Returns the number of hexadecimal digits that are needed to emit a * character with the given size (number of bits). */

Source from the content-addressed store, hash-verified

71* character with the given size (number of bits).
72*/
73std::size_t widthOf(std::size_t charSize) {
74 // Two digits for 8-bit char, four digits for 16-bit char, etc.
75 return charSize / 4;
76}
77
78/**
79* @brief Is the given character within the range of ASCII characters?

Callers 1

charToHexaStringReprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected