title: textbox split text by number of characters
body: <p>I need to read 70 character chunks and send to a terminal emulator. I'm really not sure how to do this when substring 
  length, cannot be greater amount of data in string (microsoft generates error). The last line in the textbox is always less than 70.</p>
  
  <p>Does anyone know of a better way to do this?</p>
  
  <p>TextBox can accept 1000 characters with word wrap turned on.</p>
  
  <pre><code>int startIndex = 0;
  int slength = 70;
  
  for (int i = 0; i &lt; body.Text.Length; i += 70)
  {
      if(body.Text.Length &lt; 70)
      {
          String substring1 = body.Text.Substring(startIndex, body.Text.Length);
          CoreHelper.Instance.SendHostCommand("¤:5H¤NCCRMKS / " + body.Text, UIHelper.Instance.CurrentTEControl, true, true);
      };
  
      if (body.Text.Length &gt; 70)
      {
          String substring1 = body.Text.Substring(startIndex, slength);
          CoreHelper.Instance.SendHostCommand("¤:5H¤NCCRMKS / " + body.Text, UIHelper.Instance.CurrentTEControl, true, true);
  
      };
  }
  </code></pre>