(Inspired by this challenge)
Given two input strings, one of which is exactly one character longer than the other, arrange the strings into ASCII art as if they are two halves of a zipper that is only halfway zippered. The longer word forms the bottom of the zipper, and is the first and last character of the combined zippered portion. Since that paragraph is hard to understand, take a look at some examples:
zippered paragraph z i p p gerraepdh a r a p
paragraph (the longer word) forms the bottom zipper, and the
g r a p h portion encapsulates the
e r e d portion of
zippered, and the
z i p p and
p a r a portions are offset from each other.
- Two ASCII strings in any convenient format, with one guaranteed to be even in length and the other exactly one character longer.
- Neither string will contain whitespace, but may contain any other printable ASCII value.
- You can take the input in either order. Please state in your submission the input order.
The resulting ASCII art representation of the zippered words, as described above, again in any convenient format.
- Leading or trailing newlines or whitespace are all optional, so long as the characters themselves line up correctly.
- Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
- If possible, please include a link to an online testing environment so other people can try out your code!
- Standard loopholes are forbidden.
- This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.
ppcg tests p p sctgs e t string strings s t r iinnggs r t s