Read there for a starting point ...
/t/15301/1
This is another example ...
$regexp($repeat('a large stream of text ',20),'(.{1,75})(?:\s+|$[\r\n]?)|(.{1,75})','$1$2\r\n')
The special task is to make each line the same width, for example by adding some space characters at end of each text line, then right cut the line to the wanted length.
If you want to put one pipe character at the beginning and at the end of each textline, ...
so you have to replace each CRLF sequence with a sequence of ...
'|'$char(13)$char(10)'|'
... to get one pipe character at end of a line and one pipe character in front of the next line.
At last add one pipe character at the very beginning of the text ...
(... and maybe one pipe character at the very end of the text).
DD.20161118.1745.CET