Playground for a pgrx Postgres extention called text_utils. Iterators -> Set Returning Function is pretty awesome.
text_utils=# select * from lines_of_text('hello there I hope you are well That''s all for now');
lines_of_text
---------------------
hello there
I hope you are well
That's all for now
(3 rows)
Time: 0.461 ms