mirror of https://github.com/01-edu/public.git
Augusto
5 years ago
committed by
Christopher Fremond
1 changed files with 22 additions and 0 deletions
@ -0,0 +1,22 @@
|
||||
## nruneprog |
||||
|
||||
### Instructions |
||||
|
||||
Write a function that returns the nth `rune` of a `string`. |
||||
|
||||
### Expected output : |
||||
|
||||
```console |
||||
student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 2 |
||||
e |
||||
student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 4 |
||||
l |
||||
student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 5 |
||||
o |
||||
student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" |
||||
student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" f |
||||
"f" is not an integer value |
||||
student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 9 |
||||
Invalid position: "9" in "hello" |
||||
student@ubuntu:~/piscine-go/nruneprog$ |
||||
``` |
Loading…
Reference in new issue