When using Markup, like on the SE network, an indentation of four spaces before a line of text denotes it as part of a code block, as I hope you know. If you don't, here's an example (with .
representing a space):
....Code
....More code
results in
Code
More code
The problem is, when you copy-paste code into an answer, you need to indent each line manually. This is especially difficult when working with ungolfed code, as it's likely already indented and can cause confusion. You can just select your code and hit Ctrl + K
, it turns out. Hours of my life wasted for no reason aside...
So, your goal is, given an input, return it with four spaces before each line. In the spirit of saving time copy-pasting, you are to process the entire input as a single string (so long as your language can parse it). If your language is unable to process a character (such as newlines) in strings, you may assume it is denoted/escaped through some other method supported by the language; however, the output must output each line on its own line (so no passing something like ....foo\n....bar
).
Standard loopholes not allowed. As this is code-golf, the shortest answer in bytes wins. Good luck!
Ctrl + K
\$\endgroup\$ – Koishore Roy Apr 9 '17 at 9:54