Get random separately

This commit is contained in:
topjohnwu
2023-04-03 18:20:12 -07:00
committed by John Wu
parent 46ce765860
commit 2087e47300
3 changed files with 10 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
#include <functional>
#include <string_view>
#include <bitset>
#include <random>
#include <base-rs.hpp>
@@ -159,7 +160,8 @@ void init_argv0(int argc, char **argv);
void set_nice_name(const char *name);
uint32_t binary_gcd(uint32_t u, uint32_t v);
int switch_mnt_ns(int pid);
int gen_rand_str(char *buf, int len, const void *seed_buf = nullptr, bool varlen = true);
std::mt19937_64 &get_rand(const void *seed_buf = nullptr);
int gen_rand_str(char *buf, int len, bool varlen = true);
std::string &replace_all(std::string &str, std::string_view from, std::string_view to);
std::vector<std::string> split(const std::string &s, const std::string &delims);
std::vector<std::string_view> split_ro(std::string_view, std::string_view delims);