generator: add strtolowerpls method
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
a convenience method, transforms strings to lowercase
This commit is contained in:
parent
b1fcc5d055
commit
73f8bd75a2
|
@ -86,6 +86,11 @@ auto Generator::generate_random_data(uint n) -> string {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
auto Generator::strtolowerpls(std::string &s) -> std::string {
|
||||||
|
std::transform(s.begin(),s.end(),s.begin(),::tolower);
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace generator
|
} // namespace generator
|
||||||
} // namespace fortuna
|
} // namespace fortuna
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,6 +25,8 @@ private:
|
||||||
/* n is the number of random bytes to generate */
|
/* n is the number of random bytes to generate */
|
||||||
auto generate_random_data(uint n) -> string;
|
auto generate_random_data(uint n) -> string;
|
||||||
|
|
||||||
|
auto strtolowerpls(string &s) -> string;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
auto get_state() -> Generator::G_state;
|
auto get_state() -> Generator::G_state;
|
||||||
|
|
||||||
|
|
Reference in New Issue