Skip to main content
2 of 4
deleted 29 characters in body
acrolith
  • 4k
  • 1
  • 24
  • 41

A square of text

The Challenge

Given a string, output the text in the shape of a square.

You can assume that the text will always fit in a square, and that it will never be an empty string.

Example

Input:
Hi, world

Output:
Hi,
 wo
rld

Test Cases

Input:
Hi, world! Hello

Output:
Hi, 
worl
d! H
ello

Input:
Lorem ipsum dolor sit amt

Output:
Lorem
 ipsu
m dol
or si
t amt

Input:
H

Output:
H

Rules

  • This is , so shortest answer in bytes wins!
  • Standard loopholes are forbidden.
acrolith
  • 4k
  • 1
  • 24
  • 41