title: C# Editing a string to add newlines at certain lengths
body: <p>I'm building an application that needs to deal with twitter messages. I have need of a functionality that cuts a string up at 30 characters, if the character at the 30 index isn't a space it will count back till it finds a space and add a \n to it so that it displays as multi line in my application.</p>
  
  <p>I've tried several approaches but my knowledge of C# isn't that amazing yet. I got something basic going.</p>
  
  <pre><code>string[] stringParts = new string[5];
  string temp = jsonData["results"][i]["text"].ToString();
  int length = 30;
  
  for(int count = length-1; count &gt;= 0; count--)
  {
      if(temp[count].Equals(" "))
      {
          Debug.Log(temp[count]);
      } 
  }
  </code></pre>
  
  <p>I figured i'd use Split and add the result to an array, but i can't seem to get it working.</p>