Sha256: 43cfc0fb6efdc2b6b916abb61741d27ae50bd2141ffa9be4344ac2193859f373

Contents?: true

Size: 1.08 KB

Versions: 280

Compression:

Stored size: 1.08 KB

Contents

This is a good exercise to experiment with non-standard string literals and metaprogramming.

A short introduction to non-standard string literals can be found in this [blog post](http://iaindunning.com/blog/julia-unicode.html). A detailed metaprogramming guide can be found in the [manual](http://docs.julialang.org/en/stable/manual/metaprogramming/).

You can extend your solution by adding the functionality described below. To test your solution, you have to remove the comments at the end of `runtests.jl` before running the tests as usual.

Bonus A only requires basics as outlined in the blog post. Bonus B requires significantly more knowledge of metaprogramming in Julia.

## Bonus A
Implement a string literal that acts as `ROT13` on the string:
```julia
R13"abcdefghijklmnopqrstuvwxyz" == "nopqrstuvwxyzabcdefghijklm"
```

## Bonus B
Implement string literals `R<i>`, `i = 0, ..., 26`, that shift the string for `i` values:
```julia
R0"Hello, World!" == "Hello, World!"
R4"Testing 1 2 3 testing" == "Xiwxmrk 1 2 3 xiwxmrk"
R13"abcdefghijklmnopqrstuvwxyz" == "nopqrstuvwxyzabcdefghijklm"
```

Version data entries

280 entries across 280 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.179 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.178 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.177 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.176 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.175 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.174 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.173 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.172 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.171 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.170 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.169 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.167 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.166 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.165 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.164 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.163 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.162 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.161 tracks/julia/exercises/rotational-cipher/.meta/hints.md
trackler-2.2.1.160 tracks/julia/exercises/rotational-cipher/.meta/hints.md