I have film titles that begin with the name of the film followed by ",The" if the original name begins with the. Example: Village, The
When a user wants to search the collection for a film title, he or she will naturaly type in The Village, so I have some code that switches the
word The around, then switches it back to see if the title is in the collection. My variable "the" holds the literal The which is capitalized, but the user may enter the, uncapitalized. Is there an ingenious way to use toLowerCase() somewhere in my code to catch both possibilites?
key: is the a HashMap key representing a film title.
title: is the
String recieved via the TextField
the: is "The "