I have also been hoping for a built-in word-wrap function. In the meantime, I have been tinkering with 2 solutions; neither works for universally.
the following function: $wrap2("text", width). As you can see below, it works well in messages between participants as well as in tables. However, despite protracted fiddling, I am unable to get the text to render properly on its own in a note. The function inserts the "\n" into the output returned variable, but the text is not split over multiple lines...
The link to the code is found here.
I also created a procedure $wrap1("text", width). As you see in the below output, text wraps text perfectly in a note, but does not display correctly in a table. Also, this procedure results in a syntax error when used in messages between participants (try line 23).
The link to the code is available here.
Ideally, I would like to have a single, unified function/procedure that works for each application. Any help from the community would be very much appreciated! Many thanks in advance.