I remember asking this question earlier this year as seen in this post. However, that one only wrapped text for up to two lines max.
What I want to create is a function that would wrap text up to n number of lines greater than zero (or completely wrap text around the specified width if passing -1 as the argument). In other words, how would I modify for example, Afzal's answer to support this functionality?