title: How to confirm no whitespace or trailing data with scanf/sscanf?
body: <p>sscanf() seems well suited to strip out matching data eg.:</p>
  
  <pre><code>sscanf ("abc,f,123,234", "%[a-z],%c,%d,%d", str, &amp;chr, &amp;i1, &amp;i2)
  </code></pre>
  
  <p>However I need to assert that it encountered no whitespace:</p>
  
  <pre><code>sscanf ("abc,  f  , 123    , 234  ", "%[a-z],%c,%d,%d", str, &amp;chr, &amp;i1, &amp;i2)
  /* How to tell it to fail on whitespace?? */
  </code></pre>
  
  <p>Also I need to assert there is no trailing data:</p>
  
  <pre><code>sscanf ("abc,f,123,234__SOMERUBBISH", "%[a-z],%c,%d,%d", str, &amp;chr, &amp;i1, &amp;i2)
  /* How to detect trailing rubbish or make sscanf fail */
  </code></pre>
  
  <p>How can I get sscanf to parse the string more strictly?</p>
  
  <p>This is a university assignment compiling as ANSI C and I do not have the option of including regex.</p>