A contains function will evaluate the whole string, while the hasPrefix function only evaluates the first word of the string and the hasSuffix focuses on the last word of the string.
when you type the user in lowercase of uppercase you find that the bool is case sensitive, to fix this you must create a method(?) that will allow the string to be evaluated in all lowercase or all uppercase
EX: let lowerCaseQuestion= question.lowerCased
let upperCaseQuestion=question.upperCased
Top comments (0)