rot13

Crates.iorot13
lib.rsrot13
version0.1.1
sourcesrc
created_at2015-05-03 11:03:21.868914
updated_at2015-12-11 23:55:55.315022
descriptionEncodes a String as ROT13
homepage
repositoryhttps://github.com/marekventur/rust-rot13
max_upload_size
id2008
size1,954
(marekventur)

documentation

README

ROT13

A simple ROT13 encryption function. Can be applied on encrypted code again to reveal the plain text.

ROT13 works by shifting every character in the alphabet by 13 elements. This implementation maintains upper/lower cases and ignores non-[A-Za-z] characters, thus is safe to use on any string.

Takes a &str and returns a String.

This crate was created as an exercise for me to learn Rust, but it's tested and fully working (as far as I can tell), so go for it.

Example

extern crate rot13;

#[cfg(not(test))]
fn main() {
    println!("{}", rot13::rot13("Hello World!"));
}
Commit count: 7

cargo fmt