title: How to search a string in another string?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/687577/how-to-see-if-a-substring-exists-inside-another-string-in-java-1-4">How to see if a substring exists inside another string in Java 1.4</a>  </p>
  </blockquote>
  
  
  
  <p>How would I search for a string in another string?</p>
  
  <p>This is an example of what I'm talking about:</p>
  
  <pre><code>String word = "cat";
  String text = "The cat is on the table";
  Boolean found;
  
  found = findInString(word, text); //this method is what I want to know
  </code></pre>
  
  <p>If the string "word" is in the string "text", the method "findInString(String, String)" returns true else it returns false.</p>