How to use `strtoul` to parse string where zero may be valid?
According to the documentation for strtoul , regarding its return value... This function returns the converted integral number as a long int value. If no valid conversion could be performed, a zero value is returned. What if I'm parsing a user-supplied string of "0" where, for my application, "0" may be a valid entry? In that case it seems that I have no way to determine from using strtoul if a valid conversion was performed. Is there another way to handle this? How to use strtoul to parse string where zero may be valid? Any value returned from strtoul() may be from an expected string input or