diff --git a/subjects/thirdtimeisacharm/README.md b/subjects/thirdtimeisacharm/README.md index 1ac4b2cc..4fa180fa 100644 --- a/subjects/thirdtimeisacharm/README.md +++ b/subjects/thirdtimeisacharm/README.md @@ -1,40 +1,44 @@ -# thirdtimeisacharm +## thirdtimeisacharm ### Instructions -Write a function `ThirdTimeIsACharm` that takes a string and returns another string with every third character. +Write a function `ThirdTimeIsACharm()` that takes a `string` as an argument and returns another `string` with every third character. -- Prints the output followed by newline `\n`. -- If the string is empty, return newline `\n`. -- If there is no third character, return newline `\n`. +- Prints the output followed by a newline `\n`. +- If the `string` is empty, return a newline `\n`. +- If there is no third character, return a newline `\n`. ### Expected function ```go func ThirdTimeIsACharm(str string) string { + } ``` ### Usage -Here is a possible program to test your function : +Here is a possible program to test your function: ```go package main -import "fmt" +import ( + "fmt" + "piscine" +) func main() { - fmt.Print(ThirdTimeIsACharm("123456789")) - fmt.Print(ThirdTimeIsACharm("")) - fmt.Print(ThirdTimeIsACharm("a b c d e f")) - fmt.Print(ThirdTimeIsACharm("12")) + fmt.Print(piscine.ThirdTimeIsACharm("123456789")) + fmt.Print(piscine.ThirdTimeIsACharm("")) + fmt.Print(piscine.ThirdTimeIsACharm("a b c d e f")) + fmt.Print(piscine.ThirdTimeIsACharm("12")) } ``` -And its output : +And its output: -```go +```console $ go run . | cat -e 369$ $