Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
utils
string-generator.hpp
Go to the documentation of this file.
1
//
2
// Copyright (c) 2016-2019 CNRS INRIA
3
//
4
5
#ifndef __pinocchio_utils_string_generator_hpp__
6
#define __pinocchio_utils_string_generator_hpp__
7
8
#include <string>
9
#include <cstdlib>
10
11
namespace
pinocchio
12
{
13
21
inline
std::string
randomStringGenerator
(
const
int
len)
22
{
23
std::string
res
;
24
static
const
char
alphanum[] =
25
"0123456789"
26
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
27
"abcdefghijklmnopqrstuvwxyz"
;
28
29
for
(
int
i
=0;
i
<len;++
i
)
30
res += alphanum[((
size_t
)
std::rand
() % (
sizeof
(alphanum) - 1))];
31
return
res;
32
}
33
}
34
35
#endif // __pinocchio_utils_string_generator_hpp__
inverse-kinematics.i
int i
Definition:
inverse-kinematics.py:20
pinocchio.utils.rand
def rand(n)
Definition:
bindings/python/pinocchio/utils.py:45
pinocchio
Main pinocchio namespace.
Definition:
timings.cpp:30
res
res
pinocchio::randomStringGenerator
std::string randomStringGenerator(const int len)
Generate a random string composed of alphanumeric symbols of a given length.
Definition:
string-generator.hpp:21
pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:04