title: sprintf write to string with \n
body: <p>I have this code:</p>
  
  <pre><code>str1= "a";
  str2= "b";
  sprintf(string, "0 %s %s\n", str1, str2);
  </code></pre>
  
  <p>string then contains:</p>
  
  <pre>"0 a b"</pre>
  
  <p>instead of (what I want):</p>
  
  <pre>"0 a b
  "</pre>
  
  <p>How can I solve that?</p>
  
  <p>Note: I place the quoting of the var string inside " so that you could understand the situation.
  <br><br>
  Edit:
  <br></p>
  
  <h3><b>Problem solved</b> I added 1 to the size and it worked. I don't completely understand why but it's solved</h3>