public/subjects/rostring
xpetit 46f4ddc49e
Simplify prompt, execution of Go programs, fix typos
2021-04-28 11:47:34 +02:00
..
README.md Simplify prompt, execution of Go programs, fix typos 2021-04-28 11:47:34 +02:00

README.md

rostring

Instructions

Write a program that takes a string and displays this string after rotating it one word to the left.

Thus, the first word becomes the last, and others stay in the same order.

A word is a sequence of alphanumerical characters.

Words will be separated by only one space in the output.

If the number of arguments is different from 1, the program displays a newline.

Usage

$ go run . "abc   " | cat -e
abc$
$ go run . "Let there     be light"
there be light Let
$ go run . "     AkjhZ zLKIJz , 23y"
zLKIJz , 23y AkjhZ
$ go run . | cat -e
$
$