title: Parsing a string with varying number of whitespace characters in C
body: <p>I'm pretty new to C, and trying to write a function that will parse a string such as:</p>
  
  <blockquote>
    <p>"This <em>(5 spaces here)</em> is <em>(1 space
    here)</em> a <em>(2 spaces here)</em> string."</p>
  </blockquote>
  
  <p>The function header would have a pointer to the string passed in such as:</p>
  
  <pre><code>bool Class::Parse( unsigned char* string )
  </code></pre>
  
  <p>In the end I'd like to parse each word regardless of the number of spaces between words, and store the words in a dynamic array.</p>
  
  <p>Forgive the silly questions... 
  But what would be the most efficient way to do this if I am iterating over each character? Is that how strings are stored? So if I was to start iterating with:</p>
  
  <pre><code>while ( (*string) != '\0' ) {
  
  --print *string here--
  
  }
  </code></pre>
  
  <p>Would that be printing out </p>
  
  <pre><code>T
  h
  i... etc?
  </code></pre>
  
  <p>Thank you very much for any help you can provide.</p>