Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

smart-text-wrap

Break long lines into equal-ish parts. Prefer commas if there are any.

I have some song lyrics that I wanted to wrap. No existing website did the trick.

If you break a line in two, those two should have similar lengths. Many tools however, break near the end; which looks jarring.

Original:

You think I give a damn about a Grammy?
Half of you critics can't even stomach me, let alone stand me
"But Slim, what if you win, wouldn't it be weird?"
Why? So you guys could just lie to get me here?
So you can, sit me here next to Britney Spears?

Others (Line length 36):

You think I give a damn about a
Grammy?
Half of you critics can't even
stomach me, let alone stand me
"But Slim, what if you win, wouldn't
it be weird?"
Why? So you guys could just lie to
get me here?
So you can, sit me here next to
Britney Spears?

This tool (Line length 36):

You think I give a
damn about a Grammy?
Half of you critics can't even
stomach me, let alone stand me
"But Slim, what if you win,
wouldn't it be weird?"
Why? So you guys could
just lie to get me here?
So you can, sit me here
next to Britney Spears?

I cannot believe it but this entire thing is written by ChatGpt.

I described some vague algorithms to it, and did some back and forth but... still impressive.

About

Break long lines into equal-ish parts. Prefer commas if there are any.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages