Compare commits
1 Commits
8c9a1522a0
...
70200735d9
Author | SHA1 | Date |
---|---|---|
mandlm | 70200735d9 |
|
@ -11,6 +11,7 @@ public:
|
|||
WordList &multiply(size_t factor);
|
||||
WordList &shuffle();
|
||||
|
||||
static WordList oneCap();
|
||||
static WordList fourCaps();
|
||||
static WordList fromFile(const std::filesystem::path &path);
|
||||
|
||||
|
|
|
@ -25,6 +25,19 @@ WordList &WordList::shuffle() {
|
|||
return *this;
|
||||
}
|
||||
|
||||
WordList WordList::oneCap() {
|
||||
const static std::string charset_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
WordList word_list;
|
||||
word_list.reserve(charset_.length());
|
||||
|
||||
for (auto char_1 : charset_) {
|
||||
word_list.emplace_back(std::initializer_list<char>({char_1}));
|
||||
}
|
||||
|
||||
return word_list;
|
||||
};
|
||||
|
||||
WordList WordList::fourCaps() {
|
||||
const static std::string charset_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
|
|
Loading…
Reference in New Issue