MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / getRandomKey

Function getRandomKey

src/Core/Utils/StringUtils.cpp:116–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 }
115
116 std::string getRandomKey(const std::string& set, const int len)
117 {
118 std::string r;
119 for (int i = 0; i < len; i++)
120 r.push_back(set.at(size_t(Math::randint(0, 100000) % set.size())));
121 return r;
122 }
123
124 bool contains(const std::string& string, const std::string& search)
125 {

Callers 2

loadGameObjectMethod · 0.85
Scene.cppFile · 0.85

Calls 4

randintFunction · 0.85
push_backMethod · 0.45
atMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected