[Question]
  [
Given a string as input, output a number of whitespace characters (0x0A and 0x20) equal to the length of the string.
For example, given the string `Hello, World!` your code would need to output exactly 13 whitespace characters and nothing else. These can be any mix of spaces and newlines.
Your code should not output any additional trailing newlines or spaces.
## Testcases:
```
     Input      -> Amount of whitespace to output
"Hello, World!" -> 13
"Hi"            -> 2
"   Don't
Forget about
Existing
Whitespace!   " -> 45
""              -> 0
"             " -> 13
"
"               -> 1
```
## Scoring:
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so fewest bytes wins!
  
[Answer]
# [Whitespace](https://web.archive.org/web/20150618184706/http://compsoc.dur.ac.uk/whitespace/tutorial.php), ~~311~~ ~~150~~ ~~77~~ ~~68~~ ~~65~~ ~~46~~ ~~41~~ 38 bytes
-3 bytes thanks to Kevin Cruijssen  
-27 bytes thanks to Ephphatha
```
  
   	 	 
 
  
 	
	 			
	  
	
  
 
```
[Try it online!](https://tio.run/nexus/whitespace#@8@loABECpxAyKUA5nByATmcIFKBixMswsX1/39JanEJl6GRMQA "Whitespace – TIO Nexus")
A visible format
```
'\n  \n   \t \t \n \n  \n \t\n\t \t\t\t\n\t  \n\t\n  \n \n\n'
```
Explanation (s = space, t = tab, n = new line)
```
nssn     # label(NULL) - loop start
ssststsn # push 10 in the stack -> [10]
sns      # duplicate the top of the stack -> [10, 10]
sns      # duplicate the top of the stack -> [10, 10, 10]
tnts     # read a single char from input, pop the stack and store at that address -> [10, 10] [10:<char that was read>]
ttt      # pop the stack and put the value at that adress on stack -> [10,<char>] [10:<char>]
ntssn    # jump to label(0) - since label(0) is not defined, the interpreter jumps to the end of the program - if the top of the stack (char) is 0 -> [10] [10:<char>]
tnss     # pop the top of the stack and print as ascii -> [] [10:<char>]
nsnn     # go back to the label(NULL)
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 1 byte
```
ç
```
[Try it online!](https://tio.run/nexus/japt#@394@f//Sh6pOTn5Ogrh@UU5KYpKAA "Japt – TIO Nexus")
[Answer]
# [Haskell](https://www.haskell.org/), 7 bytes
```
(>>" ")
```
[Try it online!](https://tio.run/nexus/haskell#@5@bmJmnYKtQUJSZV6KgoqBhZ6ekoKSpoOSRmpOTr6MQnl@Uk6Ko9P8/AA "Haskell – TIO Nexus") Usage: `(>>" ") "Hello, world!"`.
Given two lists (and strings are lists of characters in Haskell) the `>>` operator will repeat the second list as many times as the first list has elements. Setting `" "` as second argument means we concatenate as many spaces as the input string is long.
---
**Alternative** (same byte count):
```
(' '<$)
```
[Try it online!](https://tio.run/nexus/haskell#@5@bmJmnYKtQUJSZV6KgoqChrqBuo6KpoOSRmpOTr6MQnl@Uk6Ko9P8/AA "Haskell – TIO Nexus") Usage: `(' '<$) "Hello, world!"`.
Given some value and a list, the `<$` operator replaces each value in the list with the given value. Thus `5 <$ "abc"` results in `[5,5,5]`, and `' ' <$ "abc"` in `" "`. 
The function can equivalently be written as `(<$)' '`, in case you want to find some more marine creatures in my code.
[Answer]
# [brainfuck](https://github.com/TryItOnline/tio-transpilers), 18 bytes
```
++++++++++>,[<.>,]
```
[Try it online!](https://tio.run/##SypKzMxLK03O/v9fGw7sdKJt9Ox0Yv//90jNycnXUSjPL8pJUQQA "brainfuck – Try It Online")
Prints one newline for each byte of input. Printing spaces instead would add 4 bytes.
[Answer]
# Python, 19 bytes
```
lambda s:' '*len(s)
```
[Answer]
# Brainfuck, 16 bytes
Prints newlines.
```
,[>++++++++++.,]
```
[Answer]
# Retina, ~~3~~ 4 bytes
```
S\`.
```
Old version, doesn't work because Retina prints a trailing line feed.
```
.
 
```
(The second line contains a space).
[Answer]
# [sed](https://www.gnu.org/software/sed/), 7 bytes
```
s/./ /g
```
[Try it online!](https://tio.run/nexus/sed#@1@sr6evoJ/@/79Hak5Ovo5CeH5RTooiAA "sed – TIO Nexus")
[Answer]
# C#, ~~28~~ 24 bytes
```
s=>"".PadLeft(s.Length);
```
Old version using the `string` constructor for 28 bytes:
```
s=>new string(' ',s.Length);
```
[Answer]
# JavaScript ES6, 22 bytes
```
a=>a.replace(/./g," ")
```
```
f=a=>a.replace(/./g," ");
var test = f("Hello, World!");
console.log(test, test.length);
```
[Answer]
# [Retina](https://github.com/m-ender/retina), 5 bytes
```
\`.
¶
```
[Try it online!](https://tio.run/nexus/retina#@x@ToMd1aNv//woKCi75eeolXG75RempJQqJSfmlJVyuFZnFJZl56VzhGZklqcUFicmpikCVAA "Retina – TIO Nexus") Changes everything into newlines. The `\`` suppresses the extra newline Retina would normally output.
[Answer]
# Mathematica, 21 bytes
```
StringReplace[_->" "]
```
[Answer]
# C, 31 bytes
```
f(char*c){puts(""),*c++&&f(c);}
```
[Answer]
# PHP, 28 Bytes
```
for(;a&$argn[$i++];)echo" ";
```
[Try it online!](https://tio.run/nexus/php#s7EvyCjgUkksSs@zVfJIzcnJ11EIzy/KSVFUsv6fll@kYZ2oBpaNVsnU1o611kxNzshXUgBK/gcA "PHP – TIO Nexus")
# PHP, 29 Bytes
```
<?=str_pad('',strlen($argn));
```
[Try it online!](https://tio.run/nexus/php#s7EvyCjgUkksSs@zVfJIzcnJ11EIzy/KSVFUsuayt/tvY29bXFIUX5CYoqGurgNk5qTmaYCVa2pa//8PAA "PHP – TIO Nexus")
[Answer]
# Excel VBA, ~~17~~ 15 Bytes
Anonymous VBE immediate window funtion that takes input from cell `[A1]` and outputs spaces of length of the input to the VBE immediate window
```
?Spc([Len(A1)])
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 3 bytes
```
vð?
```
[Try it online!](https://tio.run/nexus/05ab1e#@192eIP9//8eqTk5@ToK4flFOSmKAA "05AB1E – TIO Nexus")
```
v   # For each character...
 ð? #    Output a space without a newline
```
### Other 3 byte solutions (Thanks [Magic Octopus Urn](https://codegolf.stackexchange.com/users/59376/magic-octopus-urn) and [Kevin Cruijssen](https://codegolf.stackexchange.com/users/52210/kevin-cruijssen) for most of these)
```
v¶? # For each character print a newline (without adding a newline)
võ, # For each character print the empty string with a newline
gð× # Get the length, concatenate that many copies of space
g¶× # Get the length, concatenate that many copies of newline
Sð: # Split, push a space, replace each char in input with a space
ðs∍ # Push ' ', swap, make the string of spaces as long as the input was
võJ # For each char, push a space and ''.join(stack)
v¶J # For each char, push a newline and ''.join(stack)
€ðJ # For each char, push a space. Then ''.join(stack)
€¶J # For each char, push a newline. Then ''.join(stack)
```
[Answer]
# JavaScript (ES6), 23 bytes
```
s=>" ".repeat(s.length)
```
[Answer]
# Octave, 14 bytes
```
@(a)["" 0*a+32]
```
[Answer]
# [CJam](https://sourceforge.net/p/cjam), 4 bytes
```
q,S*
```
[Try it online!](https://tio.run/nexus/cjam#PcpBCoMwFEXReVbxxEFBXEbtBlpwKFq@yS8l3yZP2t3H0IGzc@GWT3/vytRDWjyCZqxmlISq154JGraksSII3hI9A2z91zcoJW/zUwqAq8UL3c2SF2JebKcbfpqp0bvxPJt6Hg "CJam – TIO Nexus")
### Explanation
```
q     e# Read input
 ,    e# Length
  S*  e# Repeat space that many times
```
[Answer]
# [V](https://github.com/DJMcMayhem/V), 2 bytes
```
Ò 
```
[Try it online!](https://tio.run/nexus/v#@394ksL//x6pOTn5CuX5RTkpAA "V – TIO Nexus")
Note the trailing space!
[Answer]
# C, 45 bytes
Using main. Compile with gcc, ignore warnings.
```
main(c,v)char**v;{while(*(v[1]++))puts("");}
```
Usage:
```
$./a.out "Hello, World!"
```
[Answer]
# Excel, 18 bytes
```
=REPT(" ",LEN(A1))
```
Pretty boring and one byte longer than [the VBA answer](https://codegolf.stackexchange.com/a/122722/38183).
[Answer]
## [><>](https://esolangs.org/wiki/Fish), 7 bytes
```
i0(?;ao
```
The program is a loop 
```
i         //Push a character from the input onto the stack
 0        //Add a 0 to the stack
  (       //Pop the top two values of the stack, and push a 1 if the second is less than the first (In this case, the input has all been read), else push a 0
   ?      //Pop the top of the stack. If the value is a 0, skip the next instruction
    ;     // Terminate the program
     a    // Add a newline to the stack
      o   // Pop the top character of the stack and print it
```
[Answer]
# [Hexagony](https://github.com/m-ender/hexagony), ~~12~~ 11 bytes
-1 byte thanks to [Martin Ender](https://codegolf.stackexchange.com/users/8478/martin-ender)
```
,<.;.M@.>~8
```
[Try it online!](https://tio.run/##y0itSEzPz6v8/1/HRs9az9dBz67O4v9/BQUFl/w89RIut/yi9NQShcSk/NISLteKzOKSzLx0rvCMzJLU4oLE5FRFBQUA "Hexagony – Try It Online")
Here is the expanded hex: 
```
  , < . 
 ; . M @
. > ~ 8 .
 . . . .
  . . .
```
While there is input, this code runs:
```
,        # Get input
 <       # Turn right (SE) if we didn't get EOF
  M8     # Set the memory edge to 778 which is 10 (mod 256)
    ;    # Print as a character (newline)
     >   # Redirect East
      ~  # Multiply by -1. This makes the pointer go to the top when it runs off the edge
       8 # Effectively a no-op.
```
When EOF is reached:
```
,    # Get input
 <   # Turn left (NE)
  8  # Effectively a no-op
   @ # End program
```
[Answer]
# Pyth, 3 bytes
```
*dl
```
[Try it!](https://pyth.herokuapp.com/?code=%2adl&input=%22ab%22&debug=0)
Python equivalent: `len(input())*" "`
```
jmk
```
[Try this!](https://pyth.herokuapp.com/?code=jmk&input=%22abc%22&debug=0)
Python equivalent: `"\n".join(map("", input()))`
```
smb
```
[Try that!](https://pyth.herokuapp.com/?code=smb&input=%22abcd%22&debug=0)
Python equivalent: `"".join(map("\n",input())`
```
VQk
```
[Try!](https://pyth.herokuapp.com/?code=VQk&input=%22abcdefghijklmnopqrstuvwxyz%22&debug=0)
Python equivalent: `For N in input():print("")`
[Answer]
# [Perl 5](https://www.perl.org/), 7 bytes
*-1 byte thanks to [@Xcali](https://codegolf.stackexchange.com/users/72767/xcali)*
6 bytes of code + `-p` flag. 
```
y// /c
```
[Try it online!](https://tio.run/##K0gtyjH9r6yoUABkKOgW/K/U11fQT/7/3yM1JydfR6E8vygnRREA "Perl 5 – TIO Nexus")
Quite straight forward : replaces every character with a space. 
[Answer]
# Python 2, 25 bytes
```
exec'print;'*len(input())
```
-2 bytes thanks to Loovjo  
-2 bytes in the invalid code thanks to totallyhuman :p  
-3 bytes
[Answer]
# PHP, 36 bytes
```
<?=str_repeat('
',strlen($argv[1]));
```
[Try it online!](https://tio.run/nexus/php#@29jb1tcUhRflFqQmliioc6lrgPk5qTmaagkFqWXRRvGampa////3yM1JydfRyE8vygnRREA "PHP – TIO Nexus")
Outputs newlines because spaces are too mainstream
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 2 bytes
```
⁶ṁ
```
[Try it online!](https://tio.run/##y0rNyan8//9R47aHOxv///@v5AEUyNdRCM8vyklRVAIA "Jelly – Try It Online")
[Answer]
# [C (tcc)](http://savannah.nongnu.org/projects/tinycc), 31 bytes
I opted to output newlines since it's shorter...
```
f(char*s){for(;*s++;puts(""));}
```
[Try it online!](https://tio.run/nexus/c-tcc#@5@mkZyRWKRVrFmdll@kYa1VrK1tXVBaUqyhpKSpaV37PzcxM09Dk6uaSwEICooy80rSNJQ8UnNy8hXC84tyUhSVNOHqrcGKMOW5av9/zcvXTU5MzkgFAA "C (tcc) – TIO Nexus")
]