You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This section contains the various functions and variables and the algorithm description for
accepting the strings from user and matching it with the paragraph.
The string to be typed is stored in a string variable paragraph. A function
updatecurrentWordFromPara() returns the next word to be typed by the user from
the 'paragraph' variable and stored it in currentWordFromPara.
* The text field provided for taking input string from user is connected to and onchange
function named **onChanged()** which takes the input from user and stores in variable
**userInputWord**. The words **userInputWord** and **currentWordFromPara** are matched in
this function to find out if the initial characters of **currentWordFromPara** are
equivalent to the characters in **userInputWord**.
* When space is detected in the end by the **onChanged()**, it checks for equality of both
variables and if they are equal, the text field is cleared and
**updatecurrentWordFromPara()** is called. This is done until the same function does not
detect an end of **paragraph**.