Ly, 7 bytes
ir[foo]
Try it online!
Pretty straightforward, but might be worth posting since it's almost pronounceable. :)
ir -- read input codepoints into the stack, reverse the order
[ ] -- while the stack isn't empty
foo -- flip the top two entries and print as characters
[email protected]?i.o;o;.^
Try it online!
This is the first time I've tried to use Cubix, so I wouldn't be suprised if it's possible to do this with less code. It's a hard language to explain, since it's a 2D language where the code is wrapped around a cube. So the directions the instruction pointer take a hard to show in a description. I'll include a link to the online interpreter since it has a debug mode when you can see the way the code iterates through the cells.
But I'll try to explain it too...
[email protected]?i.o;o;.^ - code before it's wrapped on the cube...
i - (1) starts here, input a codepoint
? - branch if top of stack, <0 "left", >0 "right"
@ - "left" (true on EOF), halt program
^ - "right", set IP direction to "up"
? - same branch, but coming from another direction
i - "right", input another codepoint
o; - output top of stack as char, pop it off stack
o; - repeat... code wraps back to (1)
The .
characters are no-ops and are needed to place the other characters in the right position so they will wrap into place on the cube.
Here's a link to the online interpreter
http://ethproductions.github.io/cubix/?code=Li5ALmk/aS5vO287Ll4=&input=MTIzNDU2Nzg=&speed=20
char[]
array in a language like C? If so, there is a certain built-in that would make the answer very short (s***
). \$\endgroup\$