title: Generate variable containing number of characters in a string variable
body: <p>In a survey dataset I have a string variable (type: <code>str244</code>) with qualitative responses. I want to count the number of characters in each response/string and generate a new variable containing this number. </p>
  
  <p>Using the <code>egenmore</code> I have already counted the number of words using <code>nwords</code>, but I cannot find the counterpart for counting characters.</p>
  
  <p>EXAMPLE:</p>
  
  <pre><code>egen countvar = nwords(stringvar)
  </code></pre>
  
  <p>where <code>countvar</code> is the new variable name and <code>stringvar</code> is the string variable.</p>
  
  <p>Does such an <code>egen</code> function exist for counting characters?</p>