ADFGVX cipher: Difference between revisions

m
Minor code improvement.
m (Minor code improvement.)
Line 1,716:
std::string word;
while ( file_stream >> word ) {
if ( word.length() == size &&
std::transform(word.begin(), word.end(), word.begin(), [](const char& ch){ return std::toupper(ch); });
if ( word.length() == std::unordered_set<char>{ word.begin(), word.end() }.size() ) {
&& word.length() == std::unordered_set<char>{ transform(word.begin(), word.end(), }word.sizebegin(), [](const char& ch){ return std::toupper(ch); });
if &&( word.find_first_not_of(ALPHABET) == std::string::npos ) {
candidates.emplace_back(word);
}
 
}
}
908

edits