func rot13(b byte) byte {
if 'a' <= b && b <= 'z' {
b = 'a' + ((b - 'a') + 13) % 26
}
if 'A' <= b && b <= 'Z' {
b = 'A' + ((b - 'A') + 13) % 26
}
return b
}
Rot13 参考资料:http://www.hudong.com/wiki/ROT13
func rot13(b byte) byte {
if 'a' <= b && b <= 'z' {
b = 'a' + ((b - 'a') + 13) % 26
}
if 'A' <= b && b <= 'Z' {
b = 'A' + ((b - 'A') + 13) % 26
}
return b
}
Rot13 参考资料:http://www.hudong.com/wiki/ROT13
© 著作权归作者所有