Given a string and integer n, split the string at n characters, and print as follows:
Japt, 7 bytes

òVªLl)¸


Test it online!

Explanation

            Implicit: U, V = inputs
UòV   )     Split U into slices of length V.
   ªLl      If V is 0, instead use 100! (roughly 9.3326e+157).
       ¸    Join with spaces.
            Implicit: output result of last expression


9.3326e+157 is far larger than JavaScript's max string size of 9.0072e+15, so this will work for any input.