#include #include #include #include int main() { std::ifstream ifs {"cipher.txt", std::ios::binary}; std::vector cipher {}; std::copy(std::istreambuf_iterator(ifs), std::istreambuf_iterator(), std::back_inserter(cipher)); std::vector upper {}; std::vector lower {}; std::partition_copy(cipher.begin(), cipher.end(), std::back_inserter(upper), std::back_inserter(lower), [](int i) { return i < 96; }); std::copy(upper.begin(), upper.end(), std::ostream_iterator(std::cout, "")); std::transform(lower.begin(), lower.end(), std::ostream_iterator(std::cout, ""), [](char c) { if (c == '|') { return ' '; } else { return c; } } ); std::cout << std::endl; }