Sandbox post here.
Create a function or program that "Springifies" a string.
- Input will be a String in Stdin, or closest alternative
- Input will only contain printable ASCII and/or spaces
- Output will be to Stdout, or closest alternative
- A trailing newlines and spaces are acceptable
How to springify a String
- Format the String into as many ASCII spring coils as needed
- Pad the coils with spaces, up to the nearest coil
- Read off the characters, following the spring around the coils
This is an ASCII spring coil:
# # #### # # # #### #
#s are the characters of the String
Here is an example:
a b cdef g h i jklm n o p qrst u v w xyz. .
.s replace spaces for visibility.
Then, the string is read back, following the ASCII spring downwards, around the loops, hitting the
1| a <-3 V b cdef g h 4| i jklm V n 2-> ...
abgjklmhfedcginopuxyz vtsrquw (with a trailing space)
(quotations added to highlight trailing spaces - please ignore in terms of IO)
I: "abcdefghijklmnopqrstuvwxyz" O: "abgjklmhfedcginopuxyz vtsrquw " I: "!@#" O: "!@ # " I: "" O: "" I: "12345 67890" O: "12690 7 54368 " I: " " O: " "
Note that the output length is always a multiple of 15, the length of a spring coil
This is code-golf, so the shortest answer in bytes wins.