rot13 v0.1.0 Rot13

Rot13 performs a Caesar cipher, shifting 13 places up the English alphabet.

Link to this section Summary

Functions

This is a (poor) attempt at humor

Returns an :ok tuple with an encoded string, ignoring numbers and punctuation

Returns an encoded string, raising an ArgumentError if the value passed can't be encoded

Link to this section Functions

This is a (poor) attempt at humor.

Examples

iex> Rot13.decode("Execute Order 66!")
{:ok, "Rkrphgr Beqre 66!"}

iex> Rot13.encode(42)
{:error, "Value cannot be encoded"}

Returns an :ok tuple with an encoded string, ignoring numbers and punctuation.

Examples

iex> Rot13.encode("Execute Order 66!")
{:ok, "Rkrphgr Beqre 66!"}

iex> Rot13.encode(42)
{:error, "Value cannot be encoded"}

Returns an encoded string, raising an ArgumentError if the value passed can't be encoded.

Examples

iex> Rot13.encode!("Execute Order 66!")
"Rkrphgr Beqre 66!"

iex> Rot13.encode!(42)
** (ArgumentError) Value cannot be encoded