Browse Source

Update nrune.en.md

pull/315/head
Christopher Fremond 5 years ago committed by GitHub
parent
commit
8b26765d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      subjects/nrune.en.md

4
subjects/nrune.en.md

@ -4,6 +4,8 @@
Write a function that returns the nth `rune` of a `string`. Write a function that returns the nth `rune` of a `string`.
- In case of impossibilities, the function returns `0`.
### Expected function ### Expected function
```go ```go
@ -27,6 +29,8 @@ import (
func main() { func main() {
z01.PrintRune(piscine.NRune("Hello!", 3)) z01.PrintRune(piscine.NRune("Hello!", 3))
z01.PrintRune(piscine.NRune("Salut!", 2)) 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(piscine.NRune("Ola!", 4))
z01.PrintRune('\n') z01.PrintRune('\n')
} }

Loading…
Cancel
Save