MCPcopy Create free account
hub / github.com/Samsung/ONE / toHex16Bit

Function toHex16Bit

runtime/3rdparty/jsoncpp/jsoncpp.cpp:4675–4685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4673 "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
4674
4675static String toHex16Bit(unsigned int x)
4676{
4677 const unsigned int hi = (x >> 8) & 0xff;
4678 const unsigned int lo = x & 0xff;
4679 String result(4, ' ');
4680 result[0] = hex2[2 * hi];
4681 result[1] = hex2[2 * hi + 1];
4682 result[2] = hex2[2 * lo];
4683 result[3] = hex2[2 * lo + 1];
4684 return result;
4685}
4686
4687static void appendRaw(String &result, unsigned ch) { result += static_cast<char>(ch); }
4688

Callers 1

appendHexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected