Swiftpack.co - Package - 0xLeif/ROTx
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

ROTx

ROT13 with a shift

"Hello, World!".rot13() // Uryyb, Jbeyq!

"Uryyb, Jbeyq!".rot13() // Hello, World!

String+ROTx

shifted

"abcdefghijklmnopqrstuvwxyz".shifted(by: 1) // bcdefghijklmnopqrstuvwxyza

"abcdefghijklmnopqrstuvwxyz".shifted(by: 0) // abcdefghijklmnopqrstuvwxyz

"abcdefghijklmnopqrstuvwxyz".shifted(by: -1) // zabcdefghijklmnopqrstuvwxy

rot13

"abcdefghijklmnopqrstuvwxyz".rot13() // nopqrstuvwxyzabcdefghijklm

"nopqrstuvwxyzabcdefghijklm".rot13() // abcdefghijklmnopqrstuvwxyz

Github

link
Stars: 0

Releases

Initial Release - 2021-01-14T01:44:34

0.1.0

ROT13 with a shift

"Hello, World!".rot13() // Uryyb, Jbeyq!

"Uryyb, Jbeyq!".rot13() // Hello, World!

String+ROTx

shifted

"abcdefghijklmnopqrstuvwxyz".shifted(by: 1) // bcdefghijklmnopqrstuvwxyza

"abcdefghijklmnopqrstuvwxyz".shifted(by: 0) // abcdefghijklmnopqrstuvwxyz

"abcdefghijklmnopqrstuvwxyz".shifted(by: -1) // zabcdefghijklmnopqrstuvwxy

rot13

"abcdefghijklmnopqrstuvwxyz".rot13() // nopqrstuvwxyzabcdefghijklm

"nopqrstuvwxyzabcdefghijklm".rot13() // abcdefghijklmnopqrstuvwxyz