title: how to make indexof case insensitive in java
body: <p>I have a simple question. How do I make indexof case insensitive in java. This question has been already answered in some forum but I didn't understand the answer.</p>
  
  <p>Say for eg.I have a string s = Phone(Conf)
  I want to pull the record that has (Conf) like this but the users are entering CONF or conf or Conf etc.
  So my program should be able to pull the record if it finds the word conf in any case. </p>
  
  <pre><code>    if(s.indexOf("(")&gt;-1&amp;&amp; s.indexOf("Conf")&gt;-4 &amp;&amp; s.lastIndexOf(")")&gt;-1)
   {
      String s1=s.substring(s.indexOf("(Conf"),s.lastIndexOf(")")+1);
     }
  </code></pre>
  
  <p>can someone explain me pls? The above code pulls it if the string is (Conf) only.</p>