title: Is there a way to specify how many characters of a string to print out using printf()?
body: <p>Is there a way to specify how many characters of a string to print out (similar to decimal places in <code>int</code>s)?</p>
  
  <pre><code>printf ("Here are the first 8 chars: %s\n", "A string that is more than 8 chars");
  </code></pre>
  
  <p>Would like it to print: <code>Here are the first 8 chars: A string</code></p>