int i = 0;
string tmpMsg = "";
int lasti = iMsg.Length;
List msgList = newList();
foreach (char c in iMsg)
{
tmpMsg += c.ToString();
if (Encoding.Default.GetBytes(tmpMsg).Length >= 79)
{
msgList.Add(tmpMsg);
tmpMsg = "";
}
i += 1;
if (i == lasti)
{
msgList.Add(tmpMsg);
tmpMsg = "";
}
}
foreach (string msg in msgList)
{
Console.WriteLine("==============");
Console.WriteLine(msg);
Console.WriteLine(Encoding.Default.GetBytes(msg).Length);
Console.WriteLine("==============");
}