此为 Mathematica 4 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)

DigitQ

Usage

DigitQ[string]用来判断该字符串中的所有字符是否是0到9的数字,若是则返回 True,否则返回False.


Notes

• 参见Mathematica全书: 2.7.4节.
• 同时参见: LetterQ, Number.
Further Examples

Since each of the characters in this string are digits, a value of True is returned

In[1]:=  

Out[1]=

This string contains a character that is not a digit.

In[2]:=  

Out[2]=