From fd41c4bed2c2f3bded403f3a55db6d5e7d0933ee Mon Sep 17 00:00:00 2001 From: Christopher Fremond <34804391+Frenchris@users.noreply.github.com> Date: Fri, 25 Oct 2019 05:03:16 +0100 Subject: [PATCH] Update nruneprog.en.md --- subjects/nruneprog.en.md | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/subjects/nruneprog.en.md b/subjects/nruneprog.en.md index 845811fc8..3cd7cc4fd 100644 --- a/subjects/nruneprog.en.md +++ b/subjects/nruneprog.en.md @@ -15,16 +15,7 @@ This means that: Write a function that returns the nth `rune` of a `string`. -### Expected function - -```go -func NRune(s string, n int) rune { - -} -``` -### Instructions - -Write a function that returns the nth `rune` of a `string`. +- In case of impossibilities, the function returns `0`. ### Expected function @@ -49,6 +40,8 @@ import ( func main() { z01.PrintRune(piscine.NRune("Hello!", 3)) z01.PrintRune(piscine.NRune("Salut!", 2)) + z01.PrintRune(piscine.NRune("Bye!", -1)) + z01.PrintRune(piscine.NRune("Bye!", 5)) z01.PrintRune(piscine.NRune("Ola!", 4)) z01.PrintRune('\n') }