#include <iostream>
#include <z/all.hpp>
template <int N>
auto rot(uint32_t chr) -> uint32_t {
return ((chr - 'a') + N) % 26 + 'a';
return ((chr - 'A') + N) % 26 + 'A';
}
return chr;
}
const zstring from = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
const zstring to = "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM";
int main(int argc, char **argv) {
for (int i = 1; i < argc; ++i) {
auto str = zstring(argv[i]) + " ";
str.cipher(from, to).write(std::cout);
str.cipher(rot<13>).write(std::cout);
}
zstring().writeln(std::cout);
}
bool isLowerAlpha(uint32_t ch) noexcept
Check if the given character is a lowercase alphabetic character.
bool isUpperAlpha(uint32_t ch) noexcept
Check if the given character is an uppercase alphabetic character.