Return true if S consists of at least one digit and no non-digits. */
| 539 | |
| 540 | /* Return true if S consists of at least one digit and no non-digits. */ |
| 541 | ATTRIBUTE_PURE |
| 542 | static bool |
| 543 | all_digits_p (char const *s) |
| 544 | { |
| 545 | size_t n = strlen (s); |
| 546 | return c_isdigit (s[0]) && n == strspn (s, "0123456789"); |
| 547 | } |
| 548 | |
| 549 | int |
| 550 | main (int argc, char **argv) |