-
Splitting up line after desired number of characters
Hello Everyone.
I am coming from this thread https://forums.creativecow.net/docs/forums/post.php?forumid=227&postid=34484&univpostid=34484&pview=t
The final code in the post above is doing a fantastic job in adding a line break after every 20 characters.
But I am having some trouble appending the code to add one more condition.
* I am trying to create something that breaks the line after 80 character, without splitting the nearest word.
* Also, If a special character (*) or any other special character is encountered, it should completely overrule the split at 80 character code and should split the line again and reset the character counter to zero to count till 80 again.I am attaching the screenshot using the code in the above post.
So the issue is, It splits the line fine after 80 characters. The problem begins with line 2.
My line 2 ends at 35 characters. This code count these 35 characters and continues to count in the next line till the count is 80 splits the line. This doesn’t look great with what I am trying to achieve.Any help in this regard is appreciated.
Thank You!!
