[Question]
  [
## Challenge
Given a non-empty string *S* of length *L* consisting entirely of printable ASCII chars, output another string of length *L* that consists entirely of printable ASCII chars, but is not equal to *S*.
For the purposes of this challenge, a printable ASCII char is one between U+0020 and U+007E, inclusive; that is, from  (space) to `~` (tilde). Newlines and tabs are not included.
For example, given `"abcde"`, some valid outputs could be:
* `"11111"`
* `"abcdf"`
* `"edcba"`
But these would be invalid:
* `"abcde"`
* `"bcde"`
* `"abcde0"`
### Test cases
```
"asdf"
"1111"
"       "
"~~~~~"
"abcba"
"1"
" "
"~"
" ~"
"~ "
"  0"
"!@#$%^&*()ABCDEFGhijklmnop1234567890"
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
```
### Rules
* You may assume the input consists entirely of printable ASCII chars.
* You may not assume that the input does not contain all 95 printable chars.
* You may assume the input contains at least one character and is less than 256 chars long.
* The output must also consist entirely of printable ASCII chars. You could not, for example, output the byte \x7F for input `"~"`.
* The output must be different than the input with probability 1; that is, you may generate random strings until one is different than the input, but you can't just output *L* random characters and hope it's different.
* Newlines are disallowed in the output, but you may output one trailing newline which is not counted toward the string.
## Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so **the shortest code in bytes in each language wins.**
  
[Answer]
# [Python 2](https://docs.python.org/2/), 21 bytes
```
lambda s:`s`[:len(s)]
```
[Try it online!](https://tio.run/nexus/python2#PYzJDoIwFEXX7VeUOpS6EmdJmjj7EVZDEQgoIGkx7vh17JPEu7j3Dee9RMg2V0UYKWL8wAQXP49L1/Br@0mzPCaej5ERWVm9a5djpEVilxgpY2JdE@0I82/gUHMhugcYVTorLdJSZaKEYupZ2SCdbNWAbKrwHioAYAtzSLCG/PixdWfT6w9uw5HLt7v94Xg6p9njmRflq/Im09l8sVytAWMUM8owkxKMSsa@ "Python 2 – TIO Nexus")
Takes the string representation of the input string and truncates it to the length of the input string. For a typical string, this puts it in `'` quotes and chops off the end:
```
abc  ->   'abc'  ->  'ab
     rep        chop
```
Note that the new string starts with `'`. Let's show that the output always differs from the input.
* If the input has no `'`, then the output starts with `'` and the input does not.
* If the input contains a `'` and but no `"`, then Python will use `"` for the outer quotes, giving a first character `"` that's not in the input string.
* If the input has both `'` and `"`, then the outer quotes are `'` and each `'` is escaped as `\'`. Wherever the first `"` appears in the input, it's shifted right by the initial `'` in the output and by any possible escaping. This means it cannot match with a `"` in the corresponding position in the output.
Finally, note that quoting the input and possibly escaping characters always increases the number of characters, so truncating the output makes it the same length as the input.
Note that it was crucial that Python adaptively switches to `"` in the second case. If it didn't do so, it would fail on the three-character input `'\'`. Or, any longer prefix of the [fix show string](https://tio.run/nexus/haskell#@5@ZW5BfVKLgkliSqOdWmpdckpmfx5WbmJmnYKtQUJSZV6KgopCWWaFQnJFf/v8/AA) using `'`. So, this method won't work for most languages.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 3 bytes
```
ÇÈJ
```
[Try it online!](https://tio.run/nexus/05ab1e#@3@4/XCH1///CopKyiqqauoamlraOrp6@gaGRsYmpmbmFpZW1ja2dvYOjk7OLq5u7h6eXt4@vn7@AYFBwSGhYeERkVHRMbFx8QmJSckpqWnpGZlZ2Tm5efkFhUXFJaVl5RWVVdU1tXUGhgA "05AB1E – TIO Nexus")
```
Ç   # Convert to ASCII values
 È  # is even? (0 is 48 and 1 is 49 therefore 0 -> 1 and 1 -> 0)
  J # Join
```
[Answer]
# JavaScript (ES6), ~~37~~ ~~33~~ ~~36~~ ~~29~~ ~~26~~ ~~18~~ ~~21~~ 19 bytes
```
s=>s.slice(1)+ +!+s
```
[Try it online!](https://tio.run/nexus/javascript-node#S7P9X2FrV6FXnJOZnKphqKmtoK2oXfE/OT@vOD8nVS8nP10jTUPJUElTkwtNzACLWGJuUmpRTmJuQTE2DQbYjDGsAAr@BwA "JavaScript (Node.js) – TIO Nexus")
-4 bytes thanks to ETHProductions
-7 + -5 + -2 bytes thanks to CalculatorFeline
-3 bytes thanks to Rick Hitchcock
Moves the first character to the end and sets it to 0 if it's numeric and non-zero, and 1 otherwise.
### Explanation
```
s=>                    anonymous function with parameter s
                 +s    convert s to a number
                !      not (converts to boolean; relevant: 0->true,1->false)
               +       convert !+s back to number (true->1, false->0)
   s.slice(1)+         prefix the rest of the string
              ␣        needed to avoid the +s combining
```
### Proof
Because the second char becomes the first, the third char becomes the second, etc. all chars would have to be identical. The last remaining char can only be a 0 or a 1, so the repeated char would have to be either 0 or 1. But any string of 0s produces a 1 at the end, and vice-versa; therefore, it is impossible to create an input that is equal to its output. -ETHProductions
See edits for former versions and explanations.
```
f=
s=>s.slice(1)+ +!+s
console.log(f("000"))
console.log(f("111"))
console.log(f("001"))
console.log(f("110"))
console.log(f("~"))
console.log(f("111111111111111111111111111111111111111111111111111"))
console.log(f("Hello world!"))
console.log(f("23"))
console.log(f(" "))
console.log(f("1x"))
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 3 bytes
```
~Ṿṁ
```
Output is a string of digits, commas and hypen-minus characters, whose first character will differ from the first character of the input string.
[Try it online!](https://tio.run/nexus/jelly#@1/3cOe@hzsb/x9uf9S0JlLh4Y7tjxrmKPgmFiiUZKQq5GTmZesoFKcWJBYllqQqJFWCRFLTUlNTivX@/4/mUlBKLE5JU9IBMgyBAMxQgAAwuw4EwKzEpOSkRIhCiCqIPIQNoeoUoPoNwLSig7KKapyaloamo5Ozi6ube0ZmVnZObl5@gaGRsYmpmbmFJUShgmKMElCpmrqGppa2jq6evgFcgZW1ja2dvQPUAA9PL28fXz//gMCg4JDQsPCIyKjomJjYuPgEoOtSUtPS4TYUFhWXlJaVV1RWVdfU1ilxxQIA "Jelly – TIO Nexus")
### How it works
```
~Ṿṁ  Main link. Argument: s (string)
~    Map bitwise NOT over the characters c in s.
     This attempts to cast c to int and then apply bitwise NOT, mapping
     '0', ..., '9' to 0, ..., 9 (before ~), then -1, ..., -10 (after ~).
     For non-digits, the attempt fails, mapping c to 0.
 Ṿ   Uneval, yielding a comma-separated string of integers in [-10, ..., 0].
     The first character will be '-' if s starts with a digit and '0' if not.
  ṁ  Mold; truncate the result to the length of s.
```
[Answer]
# [Haskell](https://www.haskell.org/), 20 bytes
```
map$head.show.(<'M')
```
[Try it online!](https://tio.run/nexus/haskell#@59mm5tYoJKRmpiiV5yRX66nYaPuq675P8c2WilESUfJDYhDwAwwC0S4gbiJxSlpQMoQCICUAgQAWXUgAJJPSk5KBCkAyYLEQTSIqFMAqzcAkooOyiqqcWpaGpqOTs4urm7uGZlZ2Tm5efkFhkbGJqZm5haWBkqxXFy5iZl5CrYKQHf6KmgUlJYElxT55OmlaSrk/AcA "Haskell – TIO Nexus")
Converts to a string of `F` and `T`. What matters is that the characters `F` and `T` converts to each other. This is done by checking if the character is less than `M` to get `True` or `False`, then taking the first character of the string representation.
---
**[Haskell](https://www.haskell.org/), 23 bytes**
```
q '~'=' '
q _='~'
map q
```
[Try it online](https://tio.run/nexus/haskell#@1@ooF6nbquuoM5VqBBvC2RzpdnmJhYoFP7PsY1WSixOSVPSUTIEAiClAAFAVh0IAOnEpOSkRJACkCxIHESDiDoFsHoDIKnooKyiGqempaHp6OTs4urmnpGZlZ2Tm5dfYGhkbGJqZm5haaAUy8WVm5iZp2CrALTcV0GjoLQkuKTIJ08vTVMh5z8A "Haskell – TIO Nexus")
Replaces every character with `~`, except `~` becomes a space.
[Answer]
# Whitespace, 59 bytes
Visible representation
```
NSSNSSSTSSSSSNSNSSNSSNSTNTSTTTTSSTNTTSNSNSTSSSNSSSNTNSSNSNN
```
What it does:
For every character it reads it prints a space, except when it's a space, then it prints a @.
Disassembly:
```
loop:
    push 32
     dup
      dup
       dup
        ichr
       get
       sub
      jn not_32
     dup
      add
not_32:
     pchr
    jmp loop
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~6~~ 5 bytes
```
Qo!V!
```
[Try it online!](https://tio.run/nexus/matl#@x@Yrxim@P@/uoFBcYpCaoqhoToA "MATL – TIO Nexus")
### Explanation
```
Q     % Implicitly input a string. Add 1 to each code point.
o     % Parity: 0 if odd, 1 if even. Note that '0' has ASCII code 48, so after
      % having added 1 it now gives 1. Similarly. '1' has ASCII code 49, so it
      % now gives 0. All other chars give 0 or 1. 
!V!   % Convert each number to the corresponding char. Implicitly display
```
[Answer]
# [Haskell](https://www.haskell.org/), 19 bytes
An anonymous function which takes and returns a `String`. Use as `(map$(!!1).show.succ) "1111"`.
```
map$(!!1).show.succ
```
[Try it online!](https://tio.run/nexus/haskell#@59mm5tYoKKhqGioqVeckV@uV1yanPw/xzZaKURJR8kNiEPADDALRLiBuInFKWlAyhAIgJQCBABZdSAAkk9KTkoEKQDJgsRBNIioUwCrNwCSig7KKqpxaloamo5Ozi6ubu4ZmVnZObl5@QWGRsYmpmbmFpYGSrFcXLmJmXkKtgpAZ/oqaBSUlgSXFPnk6aVpKuT8BwA "Haskell – TIO Nexus") (Using @xnor's testing harness.)
* For each character in the input string, increments the character, then converts that to character literal format, then takes the second character of the literal, which is the character just after the starting `'` quote.
* For nearly all printable characters, this results in simply the incremented character. The exceptions are `&` and `~`, which instead give `\`, because their successors `'` and `\DEL` get escaped in character literals.
[Answer]
# [><>](https://esolangs.org/wiki/Fish), ~~9~~ 3 bytes
```
5%n
```
[Try it online!](https://tio.run/##S8sszvj/31Q17////7rFhkbGJgA "><> – Try It Online")
Takes input through the `-s` flag. Mods each digit with 5 and prints the integer, ending when the stack is empty. This results in only 5 possible output characters, 0-4. Each of those numbers when inputted will produce themselves plus 3, as the ASCII value of 0 is 48, which mod 5 is 3. While the output is reversed, no number is equivalent to another.
Both 7, 9 and `a`(10) also work as they are not factors of 48 and print single digits.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 5 bytes
```
žQDÀ‡
```
[Try it online!](https://tio.run/nexus/05ab1e#@390X6DL4YZHDQv//1d0UFZRjVPT0tB0dHJ2cXVzz8jMys7JzcsvMDQyNjE1M7ewNAAA "05AB1E – TIO Nexus")
**Explanation**
Replaces each char with the next printable ascii char, wrapping from tilde to space.
```
žQ     # push a string of printable acsii chars (space to tilde)
  D    # duplicate
   À   # rotate left
    ‡  # translate
```
[Answer]
# Bash + coreutils, 13
```
tr \ -~ ~\ -}
```
Transliterates the characters  to `~` (0x20 - 0x7e) with `~`, then  to `}` (0x7e, 0x20 - 0x7d).
[Try it online](https://tio.run/nexus/bash#@19SpBCjoFunUAcka///TyxOSeMyBAIuBQjgqgMBrsSk5KRELqAoVx2XQh1XnQJQ3oBL0UFZRTVOTUtD09HJ2cXVzT0jMys7Jzcvv8DQyNjE1MzcwtKAS0ExRgmoTE1dQ1NLW0dXT98ALmllbWNrZ@8A1ezh6eXt4@vnHxAYFBwSGhYeERkVHRMTGxefALQ9JTUtHW56YVFxSWlZeUVlVXVNbR0A).
[Answer]
# [V](https://github.com/DJMcMayhem/V), 7 bytes
```
íÁ/a
g?
```
[Try it online!](https://tio.run/nexus/v#@3947eFG/USudPv//xOLU9IA "V – TIO Nexus") or [Verify all test cases!](https://tio.run/nexus/v#@3947eFG/USudHuP//8Ti1PSuAyBgEsBArjqQIArMSk5KZELKMpVx6VQx1WnAJQ34FJ0UFZRjVPT0tB0dHJ2cXVzz8jMys7JzcsvMDQyNjE1M7ewNOBSUIxRAipTU9fQ1NLW0dXTN4BLWlnb2NrZO0A1e3h6efv4@vkHBAYFh4SGhUdERkXHxMTGxScAbU9JTUuHm15YVFxSWlZeUVlVXVNbBwA)
How does it work?
Consider all strings consisting of printable ASCII. Every string must either 1) Contain alphabetic characters, or 2) Contain no alphabetic characters.
So the way this program works is by first converting one non-alphabetic character into `'a'`, and then performing ROT13 on the input string. 
```
í       " Substitute:
 Á      "   A non-alphabetic character ([^a-zA-Z])
  /     "   with
   a    "   the letter 'a'
g?      " Perform ROT13 on...
        "   (Implicit) the current line.
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 22 bytes
```
f(char*s){*s=65+*s%2;}
```
Takes a string pointer and modies the first char in place.
[Try it online!](https://tio.run/nexus/c-gcc#@5@mkZyRWKRVrFmtVWxrZqqtVaxqZF37PzOvRCE3MTNPQ5OrmosTpEShODpWwVZBSaFOyZqLM02jWBNIFRQBFaZpKKkWK@kogERq/wMA "C (gcc) – TIO Nexus")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), 20 bytes
Saw Dennis's answer, thought of a 2 byte essential improvement.
```
f(char*s){*s^=*s/3;}
```
[Try it online!](https://tio.run/nexus/c-gcc#@5@mkZyRWKRVrFmtVRxnq1Wsb2xd@z8zr0QhNzEzT0OTq5qLE6RAoTg6VsFWQUmhTsmaizNNo1gTSBUUARWmaSipFivpKIBEav8DAA "C (gcc) – TIO Nexus") (Footer by Dennis.)
Like the original, modifies the first character of the string in place, but xors it with its value divided by 3 (the smallest number that works. 2 fails on the single character `'U'` which gives 127, not printable.)
[Answer]
# [Python 2](https://docs.python.org/2/), 25 bytes
```
lambda s:`s<'T'`[0]+s[1:]
```
[Try it online!](https://tio.run/##PYrJDoIwFEXX8BUFB0A3gDOxibM/4A4xFIGAQmn6MMaNv15bTbyLe95w2KstGuqLHJ9FReokJQiCGJbWyYpDNxpC6AWReBZllSEv0DXAJWWP1nZ0jePcBkkCkPEWcQPDf6kyanMHY0XlMF5SqQiTQJqbuunJSKBf5PRWkSTJNSFKUF91V1T1Rl/flW2sOt3epT@wnfVmu9sfjkV5u1c1bZjnj8aT6Wy@kNoH "Python 2 – Try It Online")
Anders Kaseorg saved a byte by extracting the first character from `True` or `False`.
[Answer]
## Haskell, ~~30~~ 26 bytes
```
f ' '='~'
f c=pred c
map f
```
[Try it online!](https://tio.run/nexus/haskell#@5@moK6gbqtep86VppBsW1CUmqKQzJVum5tYoJD2PzcxM0/BVqGgKDOvREFFIV1BSUHRyNhE6T8A "Haskell – TIO Nexus")
Replaces each char with its predecessor and space with tilde.
[Answer]
# [Octave](https://www.gnu.org/software/octave/), ~~19~~ 18 bytes
```
@(s)['',(s<66)+65]
```
[Try it online!](https://tio.run/##y08uSSxL/Z9mq6en999Bo1gzWl1dR6PYxsxMU9vMNPZ/moaSo6OjkiYXkJFYnJIGYRkCAYSlAAEQTh0IQNUmJSclQhVDVULVQHlQuk4BZo4BhKHooKyiGqempaHp6OTs4urmnpGZlZ2Tm5dfYGhkbGJqZm5hCVT5HwA "Octave – Try It Online")
**Explanation:**
```
@(s)                 % Anonymous function taking a string s as input
         s<66        % A boolean vector with `1` for all characters below ASCII-66.
        (s<66)+65    % Add 65 to this, so that all elements that are 32-65 are now 66.
                     % All other elements are 65 
    ['',         ]   % Implicitly convert the list of 65 and 66 to the letters A and B
```
[Answer]
## [CJam](https://sourceforge.net/p/cjam), 5 bytes
```
l)iA%
```
[Try it online!](https://tio.run/nexus/cjam#q/6fo5npqPo/Nq/W0Fjrf2JxShqXIRBwKUAAVx0IcCUmJSclcgFFueq4FOq46hSA8gZcig7KKqpxaloamo5Ozi6ubu4ZmVnZObl5@QWGRsYmpmbmFpYGAA "CJam – TIO Nexus")
Converts the last character to its code point and takes that modulo 10. This is clearly different for non-digit characters in the last position. But the digits start at code point 48, so taking those mod 10 will shift them left cyclically and hence the last character is always changed.
[Answer]
# [Retina](https://github.com/m-ender/retina), ~~10~~ 6 bytes
*4 bytes golfed thanks to @Neil*
```
T`p`~p
```
[Try it online!](https://tio.run/##K0otycxL/P8/JKEgoa7g/3@FOq7EpOSUYq6k4uyUPK4Crpys4rRsLmMjS5NSCwdlVa7a6hgjYxMA "Retina – Try It Online")
This transliterates  to `~`, `!` to , `"` to `!`, ..., `~` to `}`.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 4 bytes
```
®c v
```
[Try it online!](https://tio.run/nexus/japt#@39oXbJC2f//SoYGdQpKAA "Japt – TIO Nexus")
## Explanation:
```
®c v
®    At each char:
 c     Convert to its ASCII value
   v   Return 1 if divisible by 2, otherwise return 0
```
[Answer]
# [Cubix](https://github.com/ETHproductions/cubix), 10 bytes
```
..@|i?2%)O
```
[Try it online!](https://tio.run/nexus/cubix#@6@n51CTaW@kqun//7@BoZGxCQA "Cubix – TIO Nexus") or [Watch it run!](http://ethproductions.github.io/cubix/?code=Li5AfGk/MiUpTw==&input=MDEyMzQ=&speed=10)
For each char, prints `1` if the char has an even code point, `2` otherwise; `1` has an odd code point and `2` an even, so the output will never equal the input.
### Explanation
This code corresponds to the following cube net:
```
    . .
    @ |
i ? 2 % ) O . .
. . . . . . . .
    . .
    . .
```
The IP (instruction pointer) starts at the top-left corner of the far-left face, heading east. It follows this series of instructions:
```
i     Grab a char-code from STDIN and push it to the stack (-1 if there is no more input).
?     If the top item is negative, turn left and hit @ which ends the program.
      If it's positive (any printable ASCII char), turn right. The IP runs through a bunch
        of no-ops, then hits:
)     Increment the top item.
|     Mirror the IP's direction horizontally (turns it around).
)     Increment the top item again. The IP then wraps around again until it hits:
?     The top item is positive, so turn right.
2     Push a 2 to the stack.
%     Push the modulus of the top two items (0 for even char-code, 1 for odd).
)     Increment the result (now 1 for even char-code, 2 for odd).
O     Output as a number. The IP wraps back around to the i and the process starts again.
```
[Answer]
# [Alice](https://github.com/m-ender/alice), 9 bytes
```
#oi/
t i@
```
[Try it online!](https://tio.run/##S8zJTE79/185P1Ofq0Qh0@H//8TilDQA "Alice – Try It Online")
### Explanation
The idea was taken from Martin Ender's CJam submission. The first character is taken as a code point, reduced mod 10, and moved to the end of the output. Since exactly one character was changed, permuting the characters cannot result in getting the same string back.
```
#   skip next command
o   (skipped)
i   push first byte onto stack
    STACK: [97]
/   reflect to SE, switch to ordinal mode (implicit reflect to SW)
i   push remaining input onto stack as string (implicit reflect to NW)
    STACK: [97, "sdf"]
o   output top of stack (implicit reflect to SW)
    STACK: [97]
t   implicitly convert code point to decimal string, and extract last character
    (implicit reflect to NE)
    STACK: ["9", "7"]
o   output this last digit (implicit reflect to SE)
i   push empty string, since there is no more input to take (implicit reflect to NE)
/   reflect to S, switch to cardinal mode
@   terminate
```
[Answer]
# [Pushy](https://github.com/FTcode/Pushy), 1 byte
```
Q
```
**[Try it online!](https://tio.run/##Kygtzqj8/z/w////So5OzkoA "Pushy – Try It Online")**
This converts the given string into list of ASCII character codes, indexes them (modular indexing) into the uppercase alphabet, then prints the result. Essentially, each character `n` is mapped to `chr(ord(n) % 26 + 65)`. You can use **[this program](https://tio.run/##Kygtzqj8/18p3tvITDU@8D@Q6ejkrAQA "Pushy – Try It Online")** to see how the mapping works.
The output:
* Will always be the same length as the input, as the characters are directly mapped into new ones.
* Will always comprise only printable ASCII characters (as it only contains uppercase letters)
* Will always be different to the input, as there is no possible input character `n` such that `chr(ord(n) % 26 + 65) == n`, as for this to be true there must be an integer `x` such that `26x = 65`, for which there is no solution.
---
# 1 byte
```
q
```
**[Try it online!](https://tio.run/##Kygtzqj8/7/w////SolJyUoA "Pushy – Try It Online")**
This answer is exactly the same, except that it maps to *lowercase* alphabet characters rather than *uppercase* alphabet characters. This is still valid as there is no possible input character `n` such that `chr(ord(n) % 26 + 97) == n`.
[Answer]
## R, 40 bytes
`function(s)substr(shQuote(s),1,nchar(s))`
This uses the shell quoting function `shQuote` to place appropriate quotes around a string and escape quotes within the string (similar to @xnor's answer). Then take a substring that's as long as the original string (because the string might have multiple escaped characters, we need to take a substring of the correct length, so we can't just use `substring(...,3)`). `sQuote` is shorter, but converts `‘` to `‘‘’`.
Another approach, using more 'core' R stuff is 46 bytes:
`function(s)sub(".",letters[grepl("^a",s)+1],s)`
Substitute the first character with 'a', unless it is 'a', then substitute it for 'b'. `sub` only substitutes the first match, so we don't need `^`. `letters` is constant and a slightly shorter way of doing `c("a","b")`. `grepl` returns a boolean, and adding 1 converts it to a number that indexes `letters`. The `^` is needed to correctly convert "ba". 
**Code to test**
```
x = function(s)substr(shQuote(s),1,nchar(s))
test = function(t){
  t2 = x(t)
  t2!=t & nchar(t)==nchar(t2)
}
testStrings = c("a","b","ab","ba","aa",
                "'","'\"","\\\\",'"','""',
                '‘','’',"~","asdf",
                "1111","       ","~~~~~","abcba",
                "1"," ","~"," ~","~ ","  0",
                "!@#$%^&*()ABCDEFGhijklmnop1234567890",
                " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")
all(sapply(testStrings,test))
```
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 53 bytes
Includes +1 for `-c`
```
([(((()()()()){}){}){}()]({}())){{}(<({}[()()])>)}{}
```
This will decrement the first character unless it is a space, in that case it will increment the first character.
[Try it online!](https://tio.run/nexus/brain-flak#@68RrQEEmhCoWV0LQRqasRogEigCpGyA7GiQfKymnWZtde3//wqJScn/dZMB "Brain-Flak – TIO Nexus")
```
([(((()()()()){}){}){}()]      )                     # Push: input + 1 != 33 on top of...
                         ({}())                      #    input + 1
                                {{}(<          >)}{} # If (input + 1 != 33)
                                     ({}[()()])      #   Push: (input + 1) - 2
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 4 bytes
```
^1Ṿ€
```
Outputs a digit string. No output character will be equal to the corresponding input character.
[Try it online!](https://tio.run/nexus/jelly#@x9n@HDnvkdNa/4fbgeSkQoPd2x/1DBHwTexQKEkI1UhJzMvW0ehOLUgsSixJFUhqRIkkpqWmppSrPf/fzSXglJicUqakg6QYQgEYIYCBIDZdSAAZiUmJSclQhRCVEHkIWwIVacA1W8AphUdlFVU49S0NDQdnZxdXN3cMzKzsnNy8/ILDI2MTUzNzC0sIQoVFGOUgErV1DU0tbR1dPX0DeAKrKxtbO3sHaAGeHh6efv4@vkHBAYFh4SGhUdERkXHxMTGxScAXZeSmpYOt6GwqLiktKy8orKquqa2TokrFgA "Jelly – TIO Nexus")
### How it works
```
^1Ṿ€  Main link. Argument: s (string)
^1    XOR each character c in with 1.
      This attempts to cast c to int, mapping '0', ..., '9' to 0, ..., 9.
      For non-digits, the attempt fails, mapping c to 0.
      After XORing with 1, we get 1, 0, 3, 2, 5, 4, 7, 6, 9, 8 for '0', ..., '9', 
      and 1 for all non-digits.
  Ṿ€  Uneval each; mapping 0, ..., 9 to '0', ..., '9'. This yields a character
      array, which is Jelly's string type.
      Note that no character is mapped to itself.
```
[Answer]
## PHP, ~~30~~ 27
```
<?=strtr($a=$argn,$a,$a^1);
```
Changes every each char equal to the first char with the char that has the least significant bit flipped.
[Answer]
# [Ruby](https://www.ruby-lang.org/), 20+1 = 21 bytes
Uses the `-p` flag.
```
sub(/./){$&=~/1/||1}
```
[Try it online!](https://tio.run/nexus/ruby#U1YsKk2qVNAt@F9cmqShr6evWa2iZlunb6hfU2NY@/9/YnFKGpchEHApQABXHQhwJSYlJyVyAUW56rgU6rjqFIDyBlyKDsoqqnFqWhqajk7OLq5u7hmZWdk5uXn5BYZGxiamZuYWlgZcCooxSkBlauoamlraOrp6@gZwSStrG1s7eweoZg9PL28fXz//gMCg4JDQsPCIyKjomJjYuPgEoO0pqWnpcNMLi4pLSsvKKyqrqmtq6wA "Ruby – TIO Nexus")
Replaces the first character in the input with a `0` if it is `1`, or `1` otherwise.
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 9 bytes
```
{¬Ṣ|∧Ịh}ᵐ
```
[Try it online!](https://tio.run/nexus/brachylog2#ASYA2f//e8Ks4bmifOKIp@G7imh94bWQ//8iSGVsbG8sIFdvcmxkISL/Wg "Brachylog – TIO Nexus")
### Explanation
This replaces all chars by a space, except spaces which it replaces with `"0"`.
```
{      }ᵐ      Map on each char of the Input
 ¬Ṣ              The Input char is not " ", and the Output char is " "
   |             Or
    ∧Ịh          The Output char is "0"
```
[Answer]
# PHP<7.1, 31 Bytes
```
for(;~$c=$argn[$i++];)echo$c^1;
```
[Try it online!](https://tio.run/nexus/php#s7EvyCjgUkksSs@zzcrPzNMoSsxLT9VQUlDSUapT0tS05kpNzshXACvQU4rJU7L@n5ZfpGFdp5JsCxaMVsnU1o611gQpU0mOM7T@//9rXr5ucmJyRioA "PHP – TIO Nexus")
]