5 #ifndef __pinocchio_utils_string_generator_hpp__ 6 #define __pinocchio_utils_string_generator_hpp__ 24 static const char alphanum[] =
26 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 27 "abcdefghijklmnopqrstuvwxyz";
29 for (
int i=0; i<len;++i)
30 res += alphanum[((
size_t)std::rand() % (
sizeof(alphanum) - 1))];
35 #endif // __pinocchio_utils_string_generator_hpp__ Main pinocchio namespace.
std::string randomStringGenerator(const int len)
Generate a random string composed of alphanumeric symbols of a given length.