MCPcopy Create free account
hub / github.com/coreutils/coreutils / all_digits_p

Function all_digits_p

src/seq.c:541–547  ·  view source on GitHub ↗

Return true if S consists of at least one digit and no non-digits. */

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected