title: How do I tell if the c function atoi failed or if it was a string of zeros?
body: <p>When using the function <code>atoi</code> (or <code>strtol</code> or similar functions for that matter), how can you tell if the integer conversion failed or if the C-string that was being converted was a <code>0</code>?</p>
  
  <p>For what I'm doing, <code>0</code> is an acceptable value and the C-string being converted may contain any number of <code>0</code>s. It may also have leading whitespace.</p>