#how to make an if statement ignore capital letters

10 messages · Page 1 of 1 (latest)

surreal bough
#

im want the if not to care if the string starts or doesnt with a capital letter cause it brings mayor difficulties, is there a way to make it ignore this?

junior harnessBOT
#

This post has been reserved for your question.

Hey @surreal bough! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

surreal bough
#

if (day.contains("Monday"))||("monday"){
System.out.println("Good day.");
}

#

got something like this for now even tho it doesnt work I guess its easier to understand

blazing finch
#

you could just convert the String to lowercase using String#toLowerCase

surreal bough
#

uuu I see

#

I didnt know that was an option

#

thanks a lot fisch

junior harnessBOT
# surreal bough thanks a lot fisch

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.