I want to create an app which will let me input names in text inputs and use those names in a story.
I would have three inputs named as strGuide
, strHost1
and strHost2
. After filling in the names, you would a onClick
event to go to a new page with a short story like this example:
"Hello, I am strGuide and I will be accompanied today by srtHost1 and strHost2. As we walk through the mansion today, feel free to ask strHost1 or strHost2 any questions you may have."
I want the strGuide
, strHost1
and strHost2
names which can replace the same names places in the story. This is a short example. In reality, the story would be a script for the entire tour. There are also three tours, so I'd like to pick from story1, story2 or story3. I have searched for an answer, but I can't find what I am looking for.
Use
replace()
ofString
example to demonstrate using String.replace(), and this does not cover your entire Story!
see java docs for
String
http://docs.oracle.com/javase/6/docs/api/java/lang/String.html
Update: java docs:
Another example,
Output: