MCPcopy Create free account
hub / github.com/baidu/tera / Uint64ToString

Function Uint64ToString

src/leveldb/util/string_ext.cc:125–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123char* StringAsArray(std::string* str) { return str->empty() ? NULL : &*str->begin(); }
124
125std::string Uint64ToString(uint64_t i, int base) {
126 std::stringstream ss;
127 if (base == 16) {
128 ss << std::hex << std::setfill('0') << std::setw(16) << i;
129 } else if (base == 8) {
130 ss << std::oct << std::setfill('0') << std::setw(8) << i;
131 } else {
132 ss << i;
133 }
134 return ss.str();
135}
136
137uint64_t StringToUint64(const std::string& int_str, int base) {
138 uint64_t value;

Callers 8

CorruptMethod · 0.85
DeleteAnSSTFileMethod · 0.85
InitMethod · 0.85
GetMethod · 0.85
GetPropertyMethod · 0.85
DBRepairerMethod · 0.85
LogHexFileNameFunction · 0.85
DestroyDBFunction · 0.85

Calls

no outgoing calls

Tested by 2

CorruptMethod · 0.68
DeleteAnSSTFileMethod · 0.68