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

objective c - Can't build GCM with Protobuf in Xcode -

ember.js - EmberJS Model find not up-to-date with underlying store -

javascript - jQuery iScroll clickable list elements while retaining scroll? -