MCPcopy Create free account
hub / github.com/baidu/babylon / random_string

Method random_string

test/logging/test_log_entry.cpp:17–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 virtual void TearDown() override {}
16
17 ::std::string random_string(size_t size) {
18 ::std::string s;
19 s.reserve(size);
20 for (size_t i = 0; i < size; ++i) {
21 s.push_back(gen());
22 }
23 return s;
24 }
25
26 ::std::string to_string(::std::vector<struct ::iovec>& iov) {
27 ::std::string s;

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.80
reserveMethod · 0.45

Tested by

no test coverage detected