title: How to know if a given string is substring from another string in Java
body: <p>Hi 
  I have to compute if a given string is substring of a bigger string.
  For example</p>
  
  <pre><code>String str = "Hallo my world";
  String substr = "my"
  </code></pre>
  
  <p>The method "contains" should return true because str contains substr (false otherwise).</p>
  
  <p>I was looking for something like "contains" at the String class 
  but I didn't find it. I suppose that the only solution is to use 
  pattern matching. If this is the case which would be the better (cheapest) way
  to do this?</p>
  
  <p>Thanks!</p>