Try it online! Takes input surrounded in any of
"‘’“” (as long as the first and last quotes are the same).
The program immediately reaches the end, so it triggers implicit output. Since the length of the stack (0) is less than the arity of the print function (1), it implicitly checks if there's input (which there is), and if so uses it as the argument. It outputs with a trailing newline, but that doesn't matter since newlines are nops in 05AB1E.
TL;DR: The null program in 05AB1E is a one-line
Finally, each of
"‘’“” are used for strings. The difference is that
‘’“” are used for compressed strings while
" is regular. However,
‘’“” treat all ASCII characters normally, so they don't make a difference for this challenge. Declaring strings pushes them to the stack, so now the original input is on the stack of the generated program. At the end, it implicitly outputs the top of the stack - which is, you guessed it, the original input.
Say you input
"testing123". Since the program is a one-line
cat, it outputs
"testing123". Running this will push everything between
"" to the stack, therefore pushing the string
"testing123". Finally, it implicitly outputs the top of the stack, printing