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.
708 B
708 B
expandstr
Instructions
Write a program that takes a string
and displays it with exactly three spaces between each word, with no spaces or tabs at either the beginning nor the end.
The string
will be followed by a newline ('\n'
).
A word is a sequence of alphanumerical characters.
If the number of arguments is not 1, or if there are no word, the program displays nothing.
Usage
$ go run . "you see it's easy to display the same thing" | cat -e
you see it's easy to display the same thing$
$ go run . " only it's harder " | cat -e
only it's harder$
$ go run . " how funny it is" "did you hear, Mathilde ?" | cat -e
$ go run .
$