title: Php function limiting the amount of passed in characters
body: <p>I have a certain amount of characters that I can fit in the spot I want to display the category. So I was wondering if there was a way I could limit the ammount of characters that this function can output. </p>
  
  <p>I want to limit this functions output:</p>
  
  <pre><code>&lt;?php the_category(', ') ?&gt;
  outputs: WordPress, Computers, Blogging
  </code></pre>
  
  <p>Something like this:</p>
  
  <pre><code>&lt;?php char_limit(the_category(', '), 14, '...') ?&gt;
  outputs: WordPress, Com...
  </code></pre>
  
  <p>I'm new to php and wordpress, so a litle guidance on how to execute would help.</p>