mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
669 B
669 B
jumpover
Instructions
Write a function jumpover
that takes a string 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
.
Expected function
func JumpOver(str string) string {
}
Usage
Here is a possible program to test your function :
package main
import "fmt"
func main() {
fmt.Print(JumpOver("1010101010"))
fmt.Print(JumpOver(""))
fmt.Print(JumpOver("t w e l v e"))
fmt.Print(JumpOver("12"))
}
And its output :
$ go run . | cat -e
101$
$
w v$
$