MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / FormatAccount

Function FormatAccount

libs/uCommon/source/ul/util/util_String.cpp:12–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10 }
11
12 std::string FormatAccount(const AccountUid value) {
13 auto bytes_v = reinterpret_cast<const u8*>(value.uid);
14 std::stringstream strm;
15
16 #define _UL_UTIL_PRINT(idx) strm << std::hex << std::setw(2) << std::setfill('0') << std::nouppercase << static_cast<const u32>(bytes_v[idx]);
17 #define _UL_UTIL_DASH strm << "-";
18
19 _UL_UTIL_PRINT(3)
20 _UL_UTIL_PRINT(2)
21 _UL_UTIL_PRINT(1)
22 _UL_UTIL_PRINT(0)
23 _UL_UTIL_DASH
24 _UL_UTIL_PRINT(5)
25 _UL_UTIL_PRINT(4)
26 _UL_UTIL_DASH
27 _UL_UTIL_PRINT(7)
28 _UL_UTIL_PRINT(6)
29 _UL_UTIL_DASH
30 _UL_UTIL_PRINT(9)
31 _UL_UTIL_PRINT(8)
32 _UL_UTIL_DASH
33 _UL_UTIL_PRINT(15)
34 _UL_UTIL_PRINT(14)
35 _UL_UTIL_PRINT(13)
36 _UL_UTIL_PRINT(12)
37 _UL_UTIL_PRINT(11)
38 _UL_UTIL_PRINT(10)
39
40 #undef _UL_UTIL_DASH
41 #undef _UL_UTIL_PRINT
42
43 return strm.str();
44 }
45
46 std::string FormatResultDisplay(const Result rc) {
47 char res[0x40] = {};

Callers 1

MakeMenuPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected