Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

According to Apache Commons Lang's documentation for StringUtils.isNumeric(), the String '???' is numeric.

Since I believed this might be a mistake in the documentation, I ran tests to verify the statement. I found that according to Apache Commons it is numeric.

Why is this String numeric? What do those characters represent?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
97 views
Welcome To Ask or Share your Answers For Others

1 Answer

Because that "CharSequence contains only Unicode digits" (quoting your linked documentation).

All of the characters return true for Character.isDigit:

Some Unicode character ranges that contain digits:

  • 'u0030' through 'u0039', ISO-LATIN-1 digits ('0' through '9')
  • 'u0660' through 'u0669', Arabic-Indic digits
  • 'u06F0' through 'u06F9', Extended Arabic-Indic digits
  • 'u0966' through 'u096F', Devanagari digits
  • 'uFF10' through 'uFF19', Fullwidth digits

Many other character ranges contain digits as well.

??? are Devanagari digits:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...