StringUtils isNumeric returns true when input is "???", why?

I read the definition of the commons.apache.org isNumeric method and it says:

 StringUtils.isNumeric("???") = true; 

I'm not sure why "???" considered numerical. My assumptions:

  • A "?" considered unicode character
  • This is a kind of regex pattern

isNumeric Method Definition

+5
source share
2 answers

I was able to find the answer to this question by looking at the source code of StringUtils for the isNumeric method. In the source code, this line is displayed as:

 StringUtils.isNumeric("\u0967\u0968\u0969") = true 

Where u0967, u0968, u0969 are the figures of Devangari , one, two and three, respectively. This may be a problem with the browser, as a result of which the characters will not display correctly in the API.

+9
source

Looking at the code, an example

 StringUtils.isNumeric("\u0967\u0968\u0969") = true 

\u0967 , which is the "Devanagari number one"

\u0967 , which is the "Devanagari number two"

So these are numbers!

+3
source

All Articles