MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / FormatToString

Function FormatToString

src/base/strings.h:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62static inline bool IsVisible(char c) { return (c >= 0x20 && c <= 0x7E); }
63
64static inline std::string FormatToString(uint32_t name, uint32_t max_shift) {
65 uint32_t shift = 0;
66 std::string result;
67 result.resize(max_shift);
68 char* rbuffer = reinterpret_cast<char*>(&(result[0]));
69 for (uint32_t i = 0; i < max_shift; i++) {
70 rbuffer[i] = '0';
71 }
72 while (shift < max_shift) {
73 rbuffer[max_shift - shift - 1] = LABELS[name % 10];
74 shift++;
75 name /= 10;
76 }
77 return result;
78}
79
80static inline char ToHex(uint8_t i) {
81 char j = 0;

Callers 7

RollWLogFileFunction · 0.85
DeleteBinlogMethod · 0.85
RollWLogFileMethod · 0.85
RollWLogFileFunction · 0.85
RecoverFromBinlogMethod · 0.85
RollRLogFileMethod · 0.85
TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 3

RollWLogFileFunction · 0.68
RollWLogFileFunction · 0.68
TEST_FFunction · 0.68