In java (or actually android) how can I get variables from within a string?

King Neckbeard

New member
For example: I have this string
"The person's name is Ning Keckbeard. He has a height of 1.80 meters and is 19 years old"
How do I grab the name, height and age from the string and put them in variables?
 
You could break it up into an array (with space acting as a separator) - there's probably a function to do this. Then, you simply look up a word from that array (based on position) and save them as variables.
 
Back
Top