DigitQ

DigitQ[string]

yields True if all the characters in the string are digits in the range 0 through 9, and yields False otherwise.

Examples

open allclose all

Basic Examples  (1)

Test whether a character is a digit:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (1)

Properties & Relations  (1)

See Also

LetterQ  Number  StringExpression  PrintableASCIIQ

Tutorials

Introduced in 1991
(2.0)