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