lundi 23 août 2021

I need a way to detect mixed-case words in an if statement

Ok so I'm trying to write a program that prints certain messages when the input contains a certain word in a certain case.

For example, if the word is orange, the program would detect that the word orange is in the input, and then say something depending on whether it exists, is lower case, or is upper case. As far as all that goes, I'm good, the only thing I can't figure out is how to make it detect the word when it's in mixed case, like oRange, or oranGe.

Aucun commentaire:

Enregistrer un commentaire