Breaking strings in pieces...
I want to post my table input to the chat frame ingame. But as you know, there is a limit of 255 characters per message.
Here is my question:
I need to break the message into pieces with a maximum of 230 characters. After this, I want to post those pieces to the ingame chat, seperated by '...'.
In example:
string: "Hello there, I want to post a long message!"
Chatpost1: "Hello there, I want..."
Chatpost2: "...to post a long message!"
It also would be great, if this function would detect a whole word and won't split it due posting like in the following example.
Chatpost1: "Hello there, i want to po..."
Chatpost2: "...st a long message!"
I hope anybody can help me with that.
|