title: Replace space with newline
body: <p>I'm trying to do a space with line replacer for Ti-89 calculators so that I can print lines without them being cut because of the horizontal character length. They would normally look like so</p>
  
  <pre><code>This is a pretty long test
  ing for the Ti89 Calculator
  </code></pre>
  
  <p>and I would like them to look like so</p>
  
  <pre><code> This is a pretty long
   testing for the Ti89
   Calculator
  </code></pre>
  
  <p>I tried to do it with this code</p>
  
  <pre><code>void _print_line(char* string)
  {
          int k = strlen(string);
          if(k &gt; 26)
          {
                  int n = 0;
                  int c = 25;
                  while(n == 0)
                  {
                          if(string[c] == 32)
                          {
                                  n = 1;
                          }
                          else
                          {
                                  c--;
                          }
                          if(c &lt;= 0)
                          {
                                  n = 2;
                          }
                  }
                  if(n == 1)
                  {
                          string[c] == '\n';
                  }
          }
          printf("%s\n", string);
  }
  </code></pre>
  
  <p>But it seems to just ignore it and keep printing it like the first example.</p>