| 218 | }; |
| 219 | |
| 220 | inline void randomize_strings(fuzzy_config_t config, std::vector<std::string> &array, bool unique = false) { |
| 221 | array.resize(config.batch_size); |
| 222 | |
| 223 | std::uniform_int_distribution<std::size_t> length_distribution(config.min_string_length, config.max_string_length); |
| 224 | for (std::size_t i = 0; i != config.batch_size; ++i) { |
| 225 | std::size_t length = length_distribution(global_random_generator()); |
| 226 | array[i] = random_string(length, config.alphabet.data(), config.alphabet.size()); |
| 227 | } |
| 228 | |
| 229 | if (unique) { |
| 230 | std::sort(array.begin(), array.end()); |
| 231 | auto last = std::unique(array.begin(), array.end()); |
| 232 | array.erase(last, array.end()); |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | inline void randomize_strings(fuzzy_config_t config, std::vector<std::string> &array, arrow_strings_tape_t &tape, |
| 237 | bool unique = false) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…