java - Option to ignore case with .contains method? -


is there option ignore case .contains method?

i have arraylist of dvd object. each dvd object has few elements, 1 of them title. , have method searches specific title. works, i'd no case sensitive.

i'm guessing mean ignoring case when searching in string?

i don't know any, try convert string search either lower or upper case, search.

// s string search into, , seq sequence searching for. bool doescontain = s.tolowercase().contains(seq); 

edit: ryan schipper suggested, can (and better off) seq.tolowercase(), depending on situation.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -