This is the inverse of negative seven's question.
Write a program or function which, given any single, possibly-empty string of printable ASCII (codes \$[32,126]\$) outputs or returns two strings of printable ASCII.
For any two ordered, possibly empty strings \$s_1\$ and \$s_2\$, there must be third string \$s_0\$, which input to your program, outputs \$s_1\$ and \$s_2\$.
In other words, if \$\mathbb S\$ is the set of all ASCII strings (including the empty string):
\$f\$ is well-defined on \$\mathbb S\$: \$(\forall s\in\mathbb S)(f(s)\in\mathbb S\times\mathbb S)\$
\$f\$ is a surjection to \$\mathbb S\times\mathbb S\$: \$(\forall s_1,s_2\in\mathbb S)(\exists s_0\in\mathbb S)(f(s_0)=(s_1,s_2))\$
Test cases:
For each of these strings (surrounding «quotes» excluded), your output should be two strings:
«»
«hello world»
«'one' 'two' 'three' 'four'»
«"one" "two" "three" "four"»
«["one", "two", "three"]»
«; exit()»
For each of these pairs of strings, there must be at least one string you can provide to your program such that that pair is output (surrounding «quotes» excluded):
s_1 | s_2
---------|----------
«hello » | «world»
«hell» | «o world»
«hello» | « world»
« » | «»
«» | « »
«» | « !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~»
«\r\n» | «\r\n»
As always, you are encouraged to add test cases pertinent to your method.
Rules:
- Input must be a single string/character array/byte array consisting of only ASCII characters.
- Output is ordered; \$(a,b)\neq(b,a)\$. Output can be any ordered structure in your language, or printed with a newline (LF or CR LF) separator and optional trailing newline.
- I/O must be consistent. If one case handles input as an argument and outputs to stdout with a trailing newline, all cases must handle input as an argument and output to stdout with a trailing newline.
- Standard loopholes are forbidden.
- This is code-golf, so shorter programs are better!
As a reminder, this is only a surjection, not a bijection: Your program/function will likely map many different strings to the same output.