If a message is longer than a 160 characters I will need to display the message in groups of a 153 characters.
So the 161 char string should display in two groups(one group with a 153 characters and the other with 8 characters). How do I do this?
string message = "0123456789";//10char string
//string message = "01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";//161char string
int parts = (message.Length <= 160) ? 1 : ((message.Length + 152) / 153);
for (int x = 1; x <= parts; x++)
{
Console.WriteLine("this Msg Part: " + x.ToString());
Console.WriteLine("this Msg Part Text:" + "//messgae part text goes here...");
Console.WriteLine("Total Msg Parts: " + parts.ToString());
}