|
|
|
## rot14
|
|
|
|
|
|
|
|
### Instructions
|
|
|
|
|
|
|
|
Write a function `rot14` that returns the `string` within the parameter transformed into a `rot14 string`.
|
|
|
|
|
|
|
|
- There is the need to know what `rot13` stands for.
|
|
|
|
|
|
|
|
### Expected function
|
|
|
|
|
|
|
|
```go
|
|
|
|
func Rot14(str string) string {
|
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
|
|
|
Here is a possible [program](TODO-LINK) to test your function :
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
piscine ".."
|
|
|
|
"github.com/01-edu/z01"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
result := piscine.Rot14("Hello How are You")
|
|
|
|
arrayRune := []rune(result)
|
|
|
|
|
|
|
|
for _, s := range arrayRune {
|
|
|
|
z01.PrintRune(s)
|
|
|
|
}
|
|
|
|
z01.PrintRune('\n')
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
|
|
|
student@ubuntu:~/piscine-go/test$ go build
|
|
|
|
student@ubuntu:~/piscine-go/test$ ./test
|
|
|
|
Vszzc Vck ofs Mci
|
|
|
|
student@ubuntu:~/piscine-go/test$
|
|
|
|
```
|