| Bytes | Lang | Time | Link |
|---|---|---|---|
| 064 | Python 3 | 251010T060244Z | Random D |
| 050 | AWK | 250929T133200Z | xrs |
| 007 | 05AB1E | 250929T070934Z | Kevin Cr |
| 073 | C gcc | 250927T161227Z | jdt |
| 037 | JavaScript ES8 | 250926T190719Z | Arnauld |
| 039 | Dyalog APL | 250927T061116Z | Aaron |
| 003 | Vyxal | 250927T040315Z | lyxal |
| 040 | Google Sheets | 250926T214330Z | doubleun |
| 031 | Retina 0.8.2 | 250926T213722Z | Neil |
| 040 | PowerShell | 250926T201114Z | user3141 |
| 007 | Japt R | 250926T194037Z | Shaggy |
| 077 | R | 250926T175049Z | M-- |
| 043 | R | 250926T190105Z | pajonk |
| 056 | JavaScript | 250926T172216Z | QOO-OOKA |
Python 3 65 64 bytes
-1 byte from @caird coinheringaahing
lambda x,y:f"\n".join([" "*y+i.lstrip()for i in x.splitlines()])
AWK, 50 bytes
1~NR{x=$0}_++{sub(/^ +/,X);printf"%*s%s\n",x,X,$0}
1~NR{x=$0} # get indent number from first row
_++{ # after first row
sub(/^ +/,X); # remove leading spaces
printf"%*s%s\n",x,X,$0} # formatted print
05AB1E, 7 bytes
¶¡ðδÛú»
Two separated inputs as a multiline string and number.
Try it online or verify all test cases.
Explanation:
¶¡ # Split the first (implicit) input-string on newlines
δ # Map over each line:
ð Û # Trim all leading spaces
ú # Using the second (implicit) input-integer, pad that many leading spaces
# to each line
» # Join the lines back by newlines
# (after which the string is output implicitly as result)
C (gcc), 73 bytes
f(s,n){for(;s=strtok(s,"\n");s=!printf("%*s%s\n",n,"",s+strspn(s," ")));}
JavaScript (ES8), 37 bytes
Expects (string)(indent).
s=>n=>s.replace(/^ */gm,"".padEnd(n))
Commented
s => // outer function taking s
n => // inner function taking n
s.replace( // replace in s:
/^ */gm, // leading spaces on each line
"".padEnd(n) // with n spaces
) // end of replace()
Dyalog APL, 39 bytes
Accepts indent size on the left and multi-line string on the right
{(⍺⍴''),⍤1↑{⍵/⍨∨\' '≠⍵}¨⍵(≠⊆⊣)⎕UCS 10}
⍵(≠⊆⊣)⎕UCS 10 # Classic split input on newline
{ }¨ # For each line
' '≠⍵ # Find what is not a space
∨\ # Or-scan reveals the start of letters
⍵/⍨ # Select those from input
↑ # Mix (essentially join by newlines)
(⍺⍴'') # Grab left-arg many spaces
,⍤1 # Prepend those spaces to each row
💎
Created with the help of Luminespire.
Vyxal, 3 bytes
øL꘍
Expects string as a list of lines, then indent. Outputs a list of lines.
Explained
øL꘍
øL # Remove all leading spaces from each line
꘍ # And add (indent) spaces to the front of each line.
Google Sheets, 40 bytes
=regexreplace(A1,"(?m)^ *",rept(" ",B1))

Retina 0.8.2, 31 bytes
m`^ *(?<=(\d+)(¶.*)+)
$1$*
1A`
Try it online! Takes the desired indent on the first line. Explanation:
m`^ *(?<=(\d+)(¶.*)+)
Match the indent of each line, then search back for the desired indent.
$1$*
Replace the indent with a string of spaces repeated the desired number of times.
1A`
Delete the desired indent.
PowerShell, 40 bytes
$args[0]-replace'(?m)^ *',(' '*$args[1])
A regular expression that replaces any spaces following a line start (the ^ anchor) with the proper amount of spaces generated by 'multiplying' a space. The (?m) turns on multiline mode, where ^ also matches line beginnings, otherwise the .net regex engine would just match the string beginning.
R, 77 bytes
\(x,n)cat(paste0(strrep(" ",n),trimws(el(strsplit(x,"
")),"l"),collapse="
"))
JavaScript, 56 bytes
(t,n)=>t.replace(/^.*$/gm,l=>' '.repeat(n)+l.trimLeft())
Where t is the text to flatten and s is a number of count of spaces of indention.