I have created a method that I'm using in a text based adventure. It works great, but the problem is that it splits words up when I want it to \n. I need to find a way for it to \n right after the last space before char 139 in the array. Here is my code:
static void RPGWrite(string write)
{
char[] writearray = write.ToCharArray();
int writearraycount = writearray.Count();
for (int x = 0; x < writearraycount; x++)
{
Console.Write(Convert.ToString(writearray[x]));
if ((x > 1) && (x % 139 == 0))
Console.Write("\n");
System.Threading.Thread.Sleep(30);
}
}