[Question]
  [
Characters in strings are sometimes represented as their ASCII hexadecimal codes. Printable characters have two hex digits in their representation. Swapping those digits leads to another character, which will be our output.
The table of relevant character codes can be found on [Wikipedia](https://en.wikipedia.org/wiki/ASCII#Printable_characters).
## Details
1. Take a string as input.
2. For each character:
	1. Find corresponding hex value of ASCII code.
	2. Swap (reverse) the hex digits.
	3. Convert back to character.
3. Output the new string.
## Rules
* To make thinks easier, let's consider only characters "reversible" within standard printable ASCII range - that is codepoints (in hex): `22-27,32-37,42-47,52-57,62-67,72-77` or characters: `"#$%&'234567BCDEFGRSTUVWbcdefgrstuvw`.
* Input and output should be strings or closest equivalent in your language of choice.
* You may assume the input is non-empty.
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), the usual rules apply.
## Example
```
input: debug
hex codes: 64 65 62 75 67
reversed: 46 56 26 57 76
output: FV&Wv
```
## Test cases
```
bcd <-> &6F
234 <-> #3C
screw <-> 76'Vw
debug <-> FV&Wv
BEEF <-> $TTd
7W66V77 <-> success
"#$%&'234567BCDEFGRSTUVWbcdefgrstuvw <-> "2BRbr#3CScs$4DTdt%5EUeu&6FVfv'7GWgw
```
  
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `s`, 5 bytes
```
CHRHC
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJzIiwiIiwiQ0hSSEMiLCIiLCJiY2QiXQ==)
Look ma, no unicode, and it's a palindrome!
```
C   C # To charcodes...
 H H  # To hexadecimal versions of charcodes
  R   # Reverse each
      # (s flag transforms output into string)
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 26 bytes
Accepts input from STDIN.
```
$<.bytes{|c|putc c*257>>4}
```
[Try it online!](https://tio.run/##KypNqvz/X8VGL6myJLW4uia5pqC0JFkhWcvI1NzOzqT2/3/zcDOzMHNzAA "Ruby – Try It Online")
Alternative 26s:
```
$<.bytes{|c|putc c*16%255}
$<.bytes{|c|putc c*16.065} # was discovered by @Arnauld
```
# [Ruby](https://www.ruby-lang.org/), 28 bytes
```
->s{s.unpack('H*').pack'h*'}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1664ulivNK8gMTlbQ91DS11TD8RUz9BSr/1fUFpSrJAWrW4ebmYWZm6uHvsfAA "Ruby – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), ~~55~~ 54 bytes
```
lambda x:''.join(chr(c%16*16|c>>4)for c in map(ord,x))
```
[Try it online!](https://tio.run/##JY7BjoIwGITvfYo/KrRsXBNFS2IWDyp4V4TLXkpblI0CaQu4yb67Yvc2M/kyM82vudaV/yzC7@eN3XPB4LHGePZTlxXhV0W4M6cfc/rHN5ulV9QKOJQV3FlDaiWmD8972pBp@c5LIxUpq6Y1U8DYWyNgU8ghtMBMN7fSEAxfnxvAHoJGlZUhBWEehOGAsUoAe8uC5ENxzoVFXRqjhb@0euzvkOZK9tYFFKc9EjJvL9bHqZt1aBtFsbWTJBEoyChNg8AGuuVcao1G44nj4qFzRYPtbh/Fh@MpOafZsCiLi9Km7f4HRovtMVfD6InryXKfCOOsorNsh0tp0eHgkF16hF4 "Python 3 – Try It Online")
Can be shorter if bytestrings are permitted:
# [Python 3](https://docs.python.org/3/), 38 bytes
```
lambda x:bytes(c%16*16|c>>4for c in x)
```
[Try it online!](https://tio.run/##JY5Nj4IwEIbv/RUTFdtuXBO/SmIWDyh4V4TLXvqFS@IioQU02f/OYr29z@SdeaZ62p97uerz4Lu/8V@hODy24mm1IdJbsI8F@5O73Tq/1yChKOFBe5e50S8srK5JUVaNnQHGdIuAz0BA4ApzXcq70oTOTXUrLBEYvj53gCmCqi5KS3LCKQTBsMBLBfwVcyIo7YVUrjplMVqu1i6PV3tkZK07Rz7DaYeUFs3VcZxOsxaFURQ7nCSJQn7GWOr7bmAaKbUxaDSeeFM83NwwP9wfovh4OieXNBuMOr/WxjbtWzBahidRD9KzNJP1IVHW20QX3QwvpXmL/WN27RD6Bw "Python 3 – Try It Online")
[Answer]
# [APL (dzaima/APL)](https://github.com/dzaima/APL), ~~14~~ 13 bytes
−1 thanks to Unrelated String
Anonymous tacit prefix function.
```
⊖⍢(0 16⊤⎕UCS)
```
[Try it online!](https://tio.run/##SyzI0U2pSszMTfyf9qhtgsb/R13THvUu0jBQMDR71LXkUd/UUOdgzf@aXEAWUD5NPSk5RR3OMTI2QXCKk4tSyxHclNSk0nQE18nV1Q3BMw83MwszN0cIKCmrqKqpgww0NTN3cnZxdXMPCg4JDQsH2peall5UXFJaVq7@HwA "APL (dzaima/APL) – Try It Online")
`⊖` flip…
`⍢(`…`)` while argument is represented as…
 `0 16⊤`… two-digit hexadecimal representation of…
  `⎕UCS` Universal Character Set code points
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), ~~33~~ 32 bytes
*Saved 1 byte thanks to @dingledooper*
```
s=>Buffer(s).map(n=>n*257>>4)+''
```
[Try it online!](https://tio.run/##XdBNj4IwEAbgu7/CKFLYzWKC0J7ggIJ3xHIV@kE0LhiGws9na9YY0zk/mXnfuVVjBay/PoaftuNiltEMUZwoKUXvgOv9Vg@njeL2yw9JHAfuN0Iz61ro7sK7d40jnUvN@MV1l8/Zbpc2zhYG8HfBB1jv9ibQAcT0TzQgGNHJJFzUqnmTjNrlaJIkTbPXHU2souCmICXGlJAn0gIUYwLARKu1tbGRzhxikuwPaXbMT8WZlrqmkE0Pgxqn14aVn@R1rwudGFjBoeDDJkzPQukfUDkiciybaf4D "JavaScript (Node.js) – Try It Online")
### How?
When `map`'ing over a `Buffer`, the updated values are implicitly truncated to bytes, so we can just do `n * 257 >> 4` without worrying about the upper nibble.
[Answer]
# [Perl 5](https://www.perl.org/) + `-p`, 22 bytes
A port of [@dingledooper's second Ruby answer](https://codegolf.stackexchange.com/a/247813/9365).
```
$_=pack'h*',unpack'H*'
```
[Try it online!](https://tio.run/##K0gtyjH9/18l3rYgMTlbPUNLXac0D8z00FL//784uSi1/F9@QUlmfl7xf90CAA "Perl 5 – Try It Online")
[Answer]
# sh + coreutils, 34 bytes
```
xxd -p|tr -d \\n|rev|xxd -r -p|rev
```
[Try it online!](https://tio.run/##S0oszvj/v6IiRUG3oKakSEE3RSEmJq@mKLWsBixYBBIH8v7/T0lNKk3/DwA "Bash – Try It Online")
[Answer]
# [Husk](https://github.com/barbuz/Husk), 11 bytes
```
m(cB16↔B16c
```
[Try it online!](https://tio.run/##yygtzv7/P1cj2cnQ7FHbFCCZ/P///5TUpNJ0AA "Husk – Try It Online")
`m`ap `(` `c`haracters of `B`ase-16 values of `↔`=reverse of `B`ase-16 representation of `c`haracter codes of the input.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 33 bytes
```
T`#-'4-7E-GVWgvuet\dTscSCrbRB2`Ro
```
[Try it online!](https://tio.run/##JY65EoMgAER7vsKJB5WNBzSZFCjaK0KTwnDopElmQPTzjUO6fVvsW2u29@d1nmyOc1jlmOY9F@vuzfbUzKmxsXIgxTx8z1MqHd3zR5ShDhRlFXJcNsApa45AGEF@AG2kXwN3PBM7IJR2ARPGNMACIY5xKJxXyjgHbnGSZvDarBEmTUu7fhjZxMVlNMtq3eb3v@BWkEHaSzoql1Qt01ta08n46xJfdoh7sR4/ "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation: `o` substitutes for the transliteration string and `R` reverses it so each listed character gets mapped to the one opposite. Character ranges are used twice to reduce the byte count and once to avoid quoting the `E` but as `d` maps to `F` I can't use character ranges for both `d` and `E`.
[Answer]
# [GeoGebra](https://www.geogebra.org/calculator), 107 bytes
```
s=""
InputBox(s)
UnicodeToText(Zip(FromBase(Sum(Reverse(Split(ToBase(a,16),{""}))),16),a,TextToUnicode(s)))
```
To enter this code into GeoGebra, copy/paste in one line at a time and press enter to go to a new line. Do not copy paste directly; it won't work.
Input goes in the Input Box. It was a bit of a challenge to get this working, as GeoGebra has a pretty limited set of tools for working with strings.
[Try It On GeoGebra!](https://www.geogebra.org/calculator/qztmdptq)
### Explanation
`Zip(...,a,TextToUnicode(s))`: For every integer element `a` in the list of char codes of each character in the input string `s`:
```
FromBase(Sum(Reverse(Split(ToBase(a,16),{""}))),16)
                           ToBase(a,16)                Convert a to a base 16 string
                     Split(            ,{""})          Split the string into a list of characters
             Reverse(                        )         Reverse the list
         Sum(                                 )        Concatenate the characters into a string
FromBase(                                      ,16)    Convert the base 16 string back to base 10 
```
`UnicodeToText(...)`: Convert the list of char codes back to a string
[Answer]
# JavaScript (ES6), ~~113~~ ~~107~~ 77 bytes
```
s=>String.fromCharCode(...[...s].map(c=>c.charCodeAt()).map(c=>c%16*16|c>>4))
```
77 bytes if we use [Unrelated String's method](https://codegolf.stackexchange.com/a/247806).
[Try it online!](https://tio.run/##XdBbb4IwFADg9/0Ko1xak9Wo2D5BMhB8F4SHZYlQCrooNS2Xl/13VjNiljY5Lz1fzu0773NJxfXRvje8ZGPljtL14lZcmxpVgt@DSy4ClQEIoU8V8gvd8wegrkcRnXIfLYDw9W2u8XKNf6jnORCOlDeS3xi68RpU4FzQ8gzh7PlWq5mFozcNbLbOP7DYBjpQ07LhjyhAsJ0OOilZ0dUvEqVW1uvED8No6qOIkSSlLkiGcUrIEykhO0qZlDqaLwzTstXMO0z8YB9Gh2OcnNJMrcmqWsi264epwnzjHwuhFoqpNJx9UrbmLjyxTt0grXqbHLJ6GH8B "JavaScript (Node.js) – Try It Online")
---
107: Slightly better.
```
s=>String.fromCharCode(...[...s].map(c=>parseInt([...c.charCodeAt().toString(16)].reverse().join(''), 16)))
```
[Try it online!](https://tio.run/##XdBNi4MwEAbg@/4KaW1NYDdl@6EnC6vVstdq9bAUqjG6ltZIEvXnuyOVshjIZeZhMm9uSZtIKspafVQ8Y31u99LeB0qUVUFywR/ubyJc6CBCyA9ceSGPpEbU3teJkOy7UmgoU0JH@KUQJoo/R6BPE1@IYC0DC/UbLytkGPhdgwbGPeWV5HdG7rxAObqmNLtirA1ntdKWpv82AevN9h@Yb9wpgCysexIAlmlE3ZRkLG2KF/GjZdxOieN5/vgOED0Ms6mwYtOMLGtAIGRDKZNyimZzfbE0YOedaTnuwfOPpyA8RzHEZHkhpGrabpwwWzunVECggEp9ewgztdh5Z9bAH0R5a1jHuOj6Pw "JavaScript (Node.js) – Try It Online")
---
Original 113 byte answer:
```
s=>[...s].map(c=>String.fromCharCode(parseInt([...c.charCodeAt().toString(16)].reverse().join(''), 16))).join('')
```
[Try it online!](https://tio.run/##XdBdb4IwFAbg@/0KoihtstXMj/YKk4FgdisIF4uJUArDKCVtgZ/PSiTbQu96ztOP99ySNpFUlLV6q3jG@tzupb3/QgjJC3okNaD2PlCirAqUC/5wvxPhagfqREj2WSkwUIroWP9QACLFnyfAO4YXJFjLtNX1Gy8rYFnw1dAN@LfvKa8kvzN05wXIwTWl2RVCY1irlbHE/ssErDfbf2C@cadAJ2Ldk2hAsBV1U5KxtCl@iR8t43ZKHM/zx3c0McMwmwoSYxwRMiAtZEMpk3KKZnNzsbT0n3eYOO7B84@nIDxHsY7J8kJI1bTdeMNs7ZxSoQMFVJrbQ5ipxc47s0bPIMpbixzjout/AA "JavaScript (Node.js) – Try It Online")
This is my first time ever posting here. Obviously not the best solution but I wanted to compete.
[Answer]
# Rust, 49 bytes
```
fn f(s:&mut[u8]){for c in s{*c=c.rotate_left(4)}}
```
Rust doesn't have a string type for plain-ASCII strings, only UTF-8 with enforcement. An [SO answer](https://stackoverflow.com/questions/22118221/how-do-you-iterate-over-a-string-by-character/67308339#67308339) recommends `&[u8]` slices for working with ASCII bytes. I realize this is bending the rules, so I did also find sufficient incantations to get Rust to let me do this to the bytes of an actual `str` primitive type (a slice of which is like a C `char*` + length). IDK if there's any shorter way to write this, or a way to use compiler options instead of the `unsafe{}`.
# Rust using `str` strings, 72 bytes
```
fn h(s:&mut str){unsafe{for c in s.as_bytes_mut(){*c=c.rotate_left(4)}}}
```
These could [apparently](https://codegolf.stackexchange.com/questions/74096/tips-for-golfing-in-rust/74097#74097) be smaller as closures, but I'm just taking baby steps towards learning some Rust. Suggestions welcome.
Expanding ASCII codes to hex-strings and then swapping pairs is equivalent to rotating the original integer by 4, to swap nibbles. Rust is fun for that because it has as language built-in most of the common things many CPU instructions can do to integers. Instead of needing voodoo that a compiler has pattern-recognize back to a rotate or popcount for portable code to run efficiently. [The `u8` docs](https://doc.rust-lang.org/std/primitive.u8.html#method.rotate_left) include all these operations.
These compile to x86-64 asm that rotates the bytes in an array, as you can see [on Godbolt](https://godbolt.org/z/Te48r4bW6). (Note the `rol byte ptr [rcx], 4` in the cleanup loop if the SIMD code isn't easy to follow. (2x shifts and vpternlogd as a bit-blend.) Unfortunately the `-C opt-level=1` asm is rather hard to follow, and the opt-level=2 code vectorizes, so I couldn't get just a simple scalar loop to look at more easily. But I'm just using range-for stuff so I don't have to worry about loop bounds.)
Unlike many languages, Rust does *not* do implicit promotion to wider types for operators like `*`, or even implicit conversion of integer types on assignment. The `*16%255` hack does not save space over `.rotate_left(4)`. I don't know if both sets of `()` are truly necessary around the `as i32` and so on, but I'm pretty sure the `as something` and `as u8` are necessary.
```
fn g(s:&mut[u8]){for c in s{*c=((*c as i32)*16%255) as u8}}
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 7 bytes
```
⁴ɓObUḅỌ
```
[Try it online!](https://tio.run/##y0rNyan8//9R45aTk/2TQh/uaH24u@f/w91bDm09OvnhzsWPGuYo2OjaKTxqmHu4/VHTmoc7Z6kcm6j5/39ScgpYQs3MjcvI2ATMVjZ25ipOLkotB/PMzdTDyrlSUpNK08F8tzC18DIuJ1dXNzBXJSQkhcs83MwszNwcLFBcmpycWlzMpaSsoqqmDjTT1MzcydnF1c09KDgkNCwcaGNqWnpRcUlpGcQCJSOnoKQioKXBycUqJi4hKSWqpq6hqaVAJ4Wllambu4enlwMA "Jelly – Try It Online")
Not a palindrome, but still sounds kind of goofy.
```
  O        Character codes.
   b       Convert to base
⁴ɓ         16,
    U      reverse each,
⁴ɓ   ḅ     convert from base 16,
      Ọ    and convert from character codes.
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 6 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
ÇhíHçJ
```
[Try it online](https://tio.run/##yy9OTMpM/f//cHvG4bUeh5d7/f@fkppUmg4A) or [verify all test cases](https://tio.run/##HY05DsIwEEWvgpytSZXFLiNlRZRZnAIosOMEKqQ4i3IB6LkEFafITbhIGNPMG43@f3OXF3YT27QEaPd9vHYoWLb1eV0/@/V92OztiBhvkI0c14MpeS9mYCPY2AHDJEkBpMaYEgLbCWm6YVqQ9jEJozhJs7woK1qDRbRdL4dxUgITq57mRqqNLapuKTXrCaiXpfooR86FlH@pE@ash3TBpe7FZTMYflKJESy0nSyS1d2Mzj8).
**Explanation:**
```
Ç      # Convert the (implicit) input-string to a list of codepoint integers
 h     # Convert each integer to a hexadecimal string
  í    # Reverse each string in the list
   H   # Convert each string from hexadecimal to a base-10 integer
    ç  # Convert each codepoint-integer to a character
     J # Join them together to a string, since a string I/O that overwrites the
       # default I/O ruling is mandatory for this challenge
       # (after which it is output implicitly as result)
```
[Answer]
# [MathGolf](https://github.com/maxbergmark/mathgolf/blob/master/math_golf.txt), 6 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)
```
Æ$¢x¢$
```
I guess it could be a palindrome by adding a trailing no-op `Æ`. ;)
[Try it online.](https://tio.run/##HY09EoMgEEb7HANRe3@gV9FeEZs0EZEUyWRGRHOCHMSjmIORJc2@nZ3ve/u8rXf9eszOfT/4PN7ngZ1Do5zQBSVpBtPIRe3ASY1WAwvGagAdCBGUwnZFAQ6jGNI5oUVZsbppO96LASxq1otZ7eYFEfG9IC19m8TC32oRDRsQc@4/GiulMuYvTYp2XCDdSYOzik9rmLNeWbCIeYtpM@gd/QA)
**Explanation:**
```
Æ       # Loop over the characters of the (implicit) input-string,
        # using five characters as inner code-block:
 $      #  Convert the character to a codepoint-integer
  ¢     #  Convert the integer to a hexadecimal string
   x    #  Reverse it
    ¢   #  Convert it from a hexadecimal string to an integer
     $  #  Convert it from a codepoint-integer to a character
        # (after the loop, implicitly output the entire stack joined together)
```
[Answer]
# x86 32-bit machine code, 7 bytes
```
C0 02 04 42 E2 FA C3
```
[Try it online!](https://tio.run/##bVFNTxsxED17fsWwNNSGgCBJE0TYHpIGTpWqNIVWKYocr72x5HhXa2@DhPjrLJMQDq16sTzva5406jRXqmlkWCPHacLhLHfFUjo0YK5YVTgc/ZpN8NtsinOdPT60sQfMeoU0AHNFUZKSVTqCSFAMYbGQMVZ2WUe9WHBuZIhKOicEqpWs0HDrI/r223QcyAGHFOfqTON1iJktzlaf/4Iq6/MttjWupfVcwBOwnT/MLzqXD0Ngm5V1GnlQ0huetELSxiAwTfFCACM1M5yCnPY8iC1FFlbWMfDd9xlYSVsiWX/7r1KtrNeoikxfJVtaFT5ErH2wudfZvnmJKfL/MsIM/4EUhWQFvu/A1nnnJzVU6XF5ciKGuG@v8CDF88dxl5Y@N81SZdDp9iCoSm8g08s6h9FkcgOD@37/bjCA5PBD6@gjST71B6Pxl8nN7fT77MfdPRm1yasQ6z@bF2WczENzuu526KEzp1RCu1c)
Following the `fastcall` calling convention, this takes the length and address of a string in ECX and EDX, respectively, and modifies the string in place.
In assembly:
```
f:  rol BYTE PTR [edx], 4   # Rotate the character left by 4 bits, swapping its nybbles.
    inc edx     # Add 1 to EDX, advancing the pointer.
    loop f      # Subtract 1 from ECX and jump back if it is nonzero.
    ret         # Return.
```
[Answer]
# [C (clang)](http://clang.llvm.org/), ~~36~~ \$\cdots\$ ~~34~~ 29 bytes
```
f(*s){for(;*s++=*s*16%255;);}
```
[Try it online!](https://tio.run/##bZFRU7JAFIbv@xX7keiCNpUG1FDfhYbddFWGF@EFLrvmRMhwFrUcf7sdd0WtiRng5ex7nnc5y85YGmeTzUZQG6yVmBXUt6HZvLPBvnTNtuP4lr/eTDNJPuJpRi2yOiF4YcEmkoOE1xG5I6tHY8wSo0UejXbnSr2BFXyhVMLH5USpbhD0lfCGrht6ntKnNbPewC7H9bq9@6D/8PQ8eAmHyONiUoAs5wtj7R9S@TLnTPKkCq67mnna6Wm22wh1cD@sD@dK1QYDvTsoGeMAeqfdp3GBXc8Malf3g0SaTvDCS@SFYt7wHoaTfTCbZSAJe4sLG5@cvfNCxxvRMmhHy5se3g5Sj787VTdOldDtCKdZwpfYduHv5C2B6RefCVr9lHW@K9j7ik@aTeW2FEzP/3AGiNPnoDwj/@fyuBQCHSxO0xmjCwYpz6i0WuTaOjixzPJPuvW2iDxaEKpm/WJyBO4P4Y9UkscA6Pm35X7kOy4/wuQF2gQ1IsNMITLI2X9SSROiDOcoW0S3VdPeMkc7xPpkvfkG "C (clang) – Try It Online")
*Saved a byte thanks to [ovs](https://codegolf.stackexchange.com/users/64121/ovs)!!!*  
*Saved a byte thanks to [Juan Ignacio Díaz](https://codegolf.stackexchange.com/users/112488/juan-ignacio-d%c3%adaz)!!!*  
*Saved 5 bytes thanks to [dingledooper](https://codegolf.stackexchange.com/users/88546/dingledooper)!!!*
Inputs a pointer to a wide string.  
Returns the reverse hex cipher through the input pointer.
[Answer]
# Java 8, ~~116~~ ~~61~~ 57 bytes
```
s->s.chars().forEach(c->System.out.printf("%c",c*16%255))
```
-55 bytes by porting [*@UnrelatedString*'s Python answer](https://codegolf.stackexchange.com/a/247806/52210), so make sure to upvote him/her as well!  
-4 bytes thanks to *@dingledooper*
Input as String (which is mandatory according to the rules and overwrites [the default rules](https://codegolf.meta.stackexchange.com/questions/2214/whats-a-string)..), but outputs directly to STDOUT.
[Try it online.](https://tio.run/##XZHBcoIwEIbvPsVOFIVWmKkKdOrUg4qe6kEpHNoeQgiIRXRIwOk4PDtNKPZgDrvJ5t9vd5MDLrF@CL9rkmLG4A0n2bUDkGSc5hEmFDbyCFCekhCIuuN5ksXAtKmIVh1hGMc8IbCBDF5rps@YQfY4Z6pmRKfcwWSvEn22@2GcHo1TwY2zAPBIRQpBQ/LwZCkj09S0eipZ5yJIBatFNiWPoqG26scX1v6aEeRbJ5wyDi@Q0QvcVFcUkBAN0Wg8EZaRnF6ED2lQxMLPHWclnO1blmfbYveJuj2lPxBq07Lni6WzWm937rvnCwqN4pzxopSAviXzuuOFzLYGnoytvL5fCt9zXVmRFYRQxhroaL4NcqHeEdabLN2QK6bzTgtB8aJyYK/9@IKqdh6A@wdS5VyPCJCR0zPFXB0/6zJkpDSL@V7VtOYH5MoM0qj/A/esNFPbu6r5tKr@BQ)
**Explanation:**
```
s->                    // Method with String parameter and no return-type
  s.chars().forEach(c->//  Loop over the input-characters as integers:
    System.out.printf( //   Print:
     "%c",             //    Converting a codepoint-integer to character:
     c*16              //     The integer multiplied by 16
         %255))        //     Modulo-255
```
With default I/O rules this could have been 21 bytes, by having the I/O as a stream of codepoint integers: `s->s.map(c->c*16%255)` - [Try it online.](https://tio.run/##fVFLb9swDL7nVxBqHvayCGjS2EOL9pAndlgGNK5z6HaQZcW158iBKDsogvz2jEqz04BeSOrjx098FKIRgyL9c5alQIQfItfHFkCurTJbIRWs3BOgIB6vbV5ytEaJHf@u7foSgfQ@SaL/QPWnFhm0wuYSVqDh8YyDJ@Q7sffk4El@uQ06w/HYPz843r5OSuJd6U2Vp7CjtjxSzHX2@lv4Hy1tK3PFwCq0cA9aHeAf68gSmbKvbDi6I4vSqAP5VCV1Rn4yny/IhZsgiMOQol/spt3p9og9DsLJdDZfLJ/X0Uu8IRW1zQzaunEC3cDV3YymrjroxQ5bxN1NQ74dRe5HrKVUiBfR4eQ5McReS2zfzaLUdsbzF1WTSrxteuFykx3Yyb@MA7B@R6t2vKot39MQttSeG6zPgHGj9kpYb/Rt4CBeKp3ZN8/3@5rLC4vLN2GQELfVqPqZFG61jPU9l/Clz2VVlkra/681/UhUBnlR5ZrWRzLXu53OfwE)
### Original 116 bytes answer:
```
s->s.chars().forEach(c->{var t="".format("%02x",c).split("");System.out.print((char)Long.parseLong(t[1]+t[0],16));})
```
Again input as a String and output directly to STDOUT.
[Try it online.](https://tio.run/##ZVFNUyIxEL37K7oiH0kJKQWd2ZLSAzp4cT0IDgeWQ8iEYXQIU0lm0KLmt7OdWdzDbg7d6ZfO6/eSd1GJ/nvycZS5sBZ@ikwfzgAy7ZRZC6ngxZcA1S5LQNKpM5lOwbIRovUZBuuEyyS8gIa7o@3fWy43wljK@HpnIiE3VPbvD5Uw4O4I8eBWOEral4NP0pOM2yLPsCZsNP2yTm35rnS8wCmOUs/Ennc65QVSKr@jbnG1vHCLy2XvKmBsVLPjyMsoylWOMk5qGrVb9HISvFgK9scHzv824ZR1cAta7eG760BWMiE9MhheY7TSqD3mRK3KFPM4iiaYwnkQxGGIu1/kvNXudLH7JgjHD4/R5Ol1OnuL58ii1qmxrqw8QSfw986HD/520I09Nok78wpzazbzE20ppbK2IR2MX1cGu6fStq4fZ4lr30RvqkSWeF11w6d5uif1yQ/Af8/mfV0QINyoQuFbD3/0PcRzpVO3oYw1n@eX5rLp/gv8y5Vrejqrm/@uj78B)
**Explanation:**
```
s->                     // Method with String parameter and no return-type
  s.chars().forEach(c->{//  Loop over the input-characters as integers:
    var t="".format("%02x",c)
                        //   Convert the integer to a hexadecimal string of two hex-digits
          .split("");   //   Convert it to a String-array
    System.out.print(   //   Print:
      (char)            //    Cast a long to character:
        Long.parseLong( //     Convert a string to a long:
          t[1]+t[0],    //      The hex-digits in reversed order
          16));})       //      Converted from base-16 to base-10
```
Some notes:
* It loops over the array as integers with `for(int c:s)` so we can use `c` in the `"".format(...,c)`, instead of as characters with `for(var c:s)` so we would need an explicit cast to integer `(int)c`.
* Although [`Long.valueOf`](https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html#valueOf-java.lang.String-int-) is 2 bytes shorter, it'll return an object `Long`, which requires a cast to `long` before the cast to `char` (`(char)(long)Long.valueOf(...)`). So instead we use [`Long.parseLong`](https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html#parseLong-java.lang.String-int-), which already returns a primitive `long`.
[Answer]
# [Factor](https://factor), ~~29~~ 23 bytes
```
[ [ 4 8 bitroll ] map ]
```
[Try it online!](https://tio.run/##FY09D4IwGIR3fsWb@rU5KFKjGwrExUEEBmSAUqAJArZFBuNvr6/LPZfL5a7Kme6licLLNTiA4q@Rd4wreOa6WRdCT0JxED0cLesDpGAlAbLZ2qiKST4hS16MNdL1PB9BE8eJKUX3ILP5YrnC9s6h7uns@cEtvEdxgiu8qqXS4xsHviaFFGzYA97Jvm0hw/cBMvPXFAYpOo0Zz1ljfg "Factor – Try It Online")
Roll each code point 4 bits to the left, wrapping around after 8 bits.
[Answer]
# [K (ngn/k)](https://codeberg.org/ngn/k), 10 bytes
```
`c$16/|16\
```
[Try it online!](https://ngn.codeberg.page/k#eJyNkM1ygjAUhfd5CgZR24WmVUw60OlCBfeKsFBn1HABRys2CYjTn2dvCD6Au5xvJnPOdxNny6xXgn9eyRoh6Xxbq9sfdxLDMCp3mx/dp22yO5zcyr25/Hnzi+TK3LPYdM0O8c1NHQdDW8XWcNJEwThcFaCkG14bFMO+SBXyw05UNmjseb4iVhDEDaARISGliomCMRCiwWuzZbU7XdUxInQ8mXr+bL4IlmGkRkCSciGLsm5bm4PxfM/VigUTlj0NYtkeeUso1MwwKbt0FqX1GoRRJuVFOBizPIY0PyV9IXfsCBXLducU+iz/xF8FCHnIzwIPbPr2YmMOJXABvQyqHjtcMuAIqQXGe+/DUA1I7dNv1Y/0AXTSJ0DaXmftj2p1HWt5dPfW4G6OHnHWHx6R/gcJcotN)
* `16\` treating the string input as if it is integers (corresponding to the ASCII codes), convert it to a base-16 representation
* `|` reverse the digits
* `16/` convert back from the base-16 representation
* ``c$` convert back to a character/string format and (implicitly) return
[Answer]
# [Fig](https://github.com/Seggan/Fig), \$8\log\_{256}(96)\approx\$ 6.585 bytes
```
CmHe$mHC
```
[Try it online!](https://fig.fly.dev/#WyJDbUhlJG1IQyIsImRlYnVnIl0=)
Input as string, output as list of chars.
```
CmHe$mHC
       C # Charcodes
     mH  # To hex
   e$    # Reverse each
 mH      # From hex
C        # To chars
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 12 bytes
```
⭆Ｓ℅↨¹⁶⮌↨℅ι¹⁶
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRCO4BEil@yYWaHjmFZSWQLgamjoKzkCFicklqUUaTonFqRqGZjoKQallqUVANljAvyglMy8xRyMTqNbQTBMMrP//dwtTCy/7r1uWAwA "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
 Ｓ              Input string
⭆               Map over characters and join
         ι      Current character
        ℅       ASCII code
       ↨        Convert to base
          ¹⁶    Literal integer `16`
      ⮌         Reversed
   ↨            Convert from base
    ¹⁶          Literal integer `16`
  ℅             ASCII Character
                Implicitly print
```
If both parameters to `Base` are integers then the second is always the base but if one parameter is an array then the other is the base. This allows the two `16`s to be naturally separated in the code thus avoiding an explicit separator.
[Answer]
# [R](https://www.r-project.org/), 50 bytes
```
function(s,r=utf8ToInt(s))intToUtf8(16*r%%16+r/16)
```
[Try it online!](https://tio.run/##K/qflpNZEJ@ckViUnJ@SWmz7P600L7kkMz9Po1inyLa0JM0iJN8zr0SjWFMzM68kJD8UKKJhaKZVpKpqaKZdpG9opolmhIZSSmpSabqS5n8A "R – Try It Online")
Much more boring than my previous approach, but 7 bytes shorter.
---
Previous approach:
# [R](https://www.r-project.org/), 57 bytes
```
function(s)intToUtf8(t(matrix(0:255,16))[utf8ToInt(s)+1])
```
[Try it online!](https://tio.run/##K/qflpNZEJ@ckViUnJ@SWmz7P600L7kkMz9Po1gzM68kJD@0JM1Co0QjN7GkKLNCw8DKyNRUx9BMUzO6FCgRku@ZVwJUqW0Yq4lmkoZSSmpSabqS5n8A "R – Try It Online")
[Answer]
# [StackCell](https://esolangs.org/wiki/StackCell) (u32), 20
`'.[@:'ÿ'␂+*'␐x/'ÿ&;]` ~~(due to an interpreter bug, programs are required to contain valid UTF-8 - the 255 bytes need to be converted to `#FF` to run this, losing two bytes; however, by the language's specification this is a well-formed program - therefore I have not counted the two lost bytes as part of my score; let me know if I need to)~~ I have just fixed this interpreter bug
Explanation:
```
'.[@:'ÿ'␂+*'␐x/'ÿ&;]
'.                   Push a non-null byte (46) to the stack
  [                ] Loop until EOF
   @:                Input a byte (0xXY) and duplicate it
     'ÿ'␂+           Push the bytes 255 and 2 to the stack, and add them together
          *          Multiply the inputted character by 0x101 (-> 0xXYXY)
           '␐x       Push the byte 16 to the stack and swap it below the multiplied character
              /      Divide the character by 16 (-> 0xXYX)
               'ÿ&   Mask the character with 0xFF (-> 0xYX)
                  ;  Print the swapped character
```
[Answer]
# [J-uby](https://github.com/cyoce/J-uby), 26 bytes
```
~:unpack&'H*'|~:pack&'h*' 
```
[Try it online!](https://tio.run/##y9ItTar8n6Zgq/C/zqo0ryAxOVtN3UNLvabOCsLO0FJX@F9QWlKskKanoZSSmlSarqTJBRdISk5B5hoZmyBzi5OLUsuRBTD0O7m6uiHzzcPNzMLMzZGFYpSUVVTV1IFGm5qZOzm7uLq5BwWHhIaFA@1OTUsvKi4pLQNZwvUfAA "J-uby – Try It Online")
packing and unpacking turns out to be the same length as the optimal ruby solution.
# [J-uby](https://github.com/cyoce/J-uby), 37 bytes
```
:bytes|:*&(:*&257|~:>>&4)|~:pack&'c*'
```
[Try it online!](https://tio.run/##y9ItTar8n6Zgq/DfKqmyJLW4xkpLTQOIjUzNa@qs7OzUTDSBdEFicraaerKW@v@C0pJihTQ9DaWU1KTSdCVNLrhAUnIKMtfI2ASZW5xclFqOLICh38nV1Q2Zbx5uZhZmbo4sFKOkrKKqpg402tTM3MnZxdXNPSg4JDQsHGh3alp6UXFJaRnIEq7/AA "J-uby – Try It Online")
# [J-uby](https://github.com/cyoce/J-uby), 52 bytes
```
:bytes|:*&(~:to_s&16|:reverse|~:to_i&16)|~:pack&'c*'
```
[Try it online!](https://tio.run/##y9ItTar8n6Zgq/DfKqmyJLW4xkpLTaPOqiQ/vljN0KzGqii1LLWoOLUGLJQJFNIEMgsSk7PV1JO11P8XlJYUK6TpaSilpCaVpitpcsEFkpJTkLlGxibI3OLkotRyZAEM/U6urm7IfPNwM7Mwc3NkoRglZRVVNXWg0aZm5k7OLq5u7kHBIaFh4UC7U9PSi4pLSstAlnD9BwA "J-uby – Try It Online")
[Answer]
# Desmos, ~~105~~ 17 bytes
```
f(a)=mod(16a,255)
```
[Try it on Desmos!](https://www.desmos.com/calculator/upw0fjsnet)
Input and output are list of codepoints because Desmos doesn't support strings.
[Answer]
# ><>, ~~22~~ 21 bytes
-1 byte thanks to enigma
```
i:0(?;:a6+,$a6+:@%*+o
```
[E'—–GöæÆ–æV](https://mousetail.github.io/Fish/#eyJ0ZXh0IjoiaTowKD87OmE2KywkYTYrOkAlKitvIiwiaW5wdXQiOiJkZWJ1ZyIsInN0YWNrIjoiIiwibW9kZSI6Im51bWJlcnMifQ==)
## Explanation
`a6+` is 16. Basically, divide by 16, mod 16, `* 16`, sum up and print.
[Answer]
# [Burlesque](https://github.com/FMNSSun/Burlesque), 13 bytes
```
m{**b6<-b6L[}
```
[Try it online!](https://tio.run/##JY67DoMgAEV3vsKo1cTEpPEBi@ngc@nkA4ZuILrYQRAZjN9uDd3uucM9lyqxcLkqfh3rU@rrewQBhVlI4ftzXidZLspGKwtflgdrEMWJyU5cAMkE14YQ9LEGI6dqNlxjj@wgr6raoNv3I0AEQoyQKaRijEsJbMd9eP69mUKUF2VVN23XD5jcRj7NQm5q/wvsKG@puKUdk25S9uP2SKuBq/sSnnYfNWTWPw "Burlesque – Try It Online")
```
m{  # Map
 ** # Codepoint
 b6 # To hex
 <- # Reverse
 b6 # From hex
 L[ # To char
}
```
[Answer]
# [BQN](https://mlochbaum.github.io/BQN/index.html), 17 bytes
```
16(@+⟜⌊÷˜+⊣×|)-⟜@
```
[Try it at BQN online REPL](https://mlochbaum.github.io/BQN/try.html#code=RmxpcF9oZXgg4oaQIDE2KEAr4p+c4oyKw7fLnCviiqPDl3wpLeKfnEAKRmxpcF9oZXggImRlYnVnIgo=)
```
               -⟜@   # subtract null character (@) to get ASCII codepoints
16(           )       # now, with this as right arg and 16 as left arg:
             |        # right arg (codepoints) modulo left arg (16)
            ×         # multiplied by 
           ⊣          # left arg (16)
          +           # plus
        ÷˜            # right arg (codepoints) divided by left arg (16) 
      ⟜⌊              # now use the floor of this 
    @+                # to add to null character (@) to get ASCII characters
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~70~~ ~~66~~ 60 bytes
*-7 bytes thanks to [@ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat)*
```
main(t,v)char**v;{for(++v;t=**v;++*v)putchar(t>>4|t%16<<4);}
```
[Try it online!](https://tio.run/##S9ZNT07@/z83MTNPo0SnTDM5I7FIS6vMujotv0hDW7vMusQWxNXW1irTLCgtAUlrlNjZmdSUqBqa2diYaFrX/v//PyU1qTQdAA "C (gcc) – Try It Online")
]