mirror of https://github.com/bonobonet/botty
parent
737833dfd7
commit
7daf06ecaa
|
@ -47,8 +47,8 @@ public final class Rot13 : Mod
|
||||||
{
|
{
|
||||||
import std.algorithm : map;
|
import std.algorithm : map;
|
||||||
import std.conv : to;
|
import std.conv : to;
|
||||||
|
|
||||||
return to!(string)(toBeSecretified.map!((ch) {
|
return to!(string)(text.map!((ch) {
|
||||||
if (ch >= 'a' && ch <= 'z')
|
if (ch >= 'a' && ch <= 'z')
|
||||||
ch = (ch - 'a' + 13) % 26 + 'a';
|
ch = (ch - 'a' + 13) % 26 + 'a';
|
||||||
if (ch >= 'A' && ch <= 'Z')
|
if (ch >= 'A' && ch <= 'Z')
|
||||||
|
|
Loading…
Reference in New Issue