MCPcopy Create free account
hub / github.com/apache/arrow / RandomChars

Method RandomChars

cpp/src/arrow/filesystem/azurefs_test.cc:345–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343 static std::string RandomContainerName(RNG& rng) { return RandomChars(32, rng); }
344
345 static std::string RandomChars(int count, RNG& rng) {
346 const auto fillers = std::string("abcdefghijlkmnopqrstuvwxyz0123456789");
347 std::uniform_int_distribution<int> d(0, static_cast<int>(fillers.size()) - 1);
348 std::string s;
349 std::generate_n(std::back_inserter(s), count, [&] { return fillers[d(rng)]; });
350 return s;
351 }
352
353 static int RandomIndex(int end, RNG& rng) {
354 return std::uniform_int_distribution<int>(0, end - 1)(rng);

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected