Is the indexOf(String) method case sensitive? If so, is there a case insensitive version of it?
Yes, I am fairly sure it is. One method of working around that using the standard library would be:
int index = str.toUpperCase().indexOf("FOO");