KDECore
KRandom Namespace Reference
Functions | |
int | random () |
QString | randomString (int length) |
Detailed Description
Helper class to create random data.
This namespace provides methods which generate random data.
Function Documentation
int KRandom::random | ( | ) |
Generates a uniform random number.
- Returns
- A random number in the range [0, RAND_MAX). The RNG is seeded on first use.
Definition at line 32 of file krandom.cpp.
QString KRandom::randomString | ( | int | length | ) |
Generates a random string.
It operates in the range [A-Za-z0-9]
- Parameters
-
length Generate a string of this length.
- Returns
- the random string
Definition at line 52 of file krandom.cpp.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.