java - Check if a String is a number -


i know can check if string integer doing integer.parseint("1234");
want link textual number integer.
i.e.

  • "one" == 1
  • "two" == 2
  • "three" == 3
  • "twenty" == 20

is there library can use this, or have program hand?

the reason want this, have android application speech recognition.
user can count. number shown on screen.

edit
after experimenting, figured out speechrecognizer class use automatically parses numbers actual numbers...

i not sure if there library here example.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -