title: Swift equivalent for Java indexOf and lastIndexOf of a string
body: <p>I come from Java. I studied the Swift documentation and understood most of the concepts.  </p>
  
  <p>What I now looking for is an equivalent to the Java indexOf and lastIndexOf methods to finding positions of substring in a string.</p>
  
  <p>I already found a solution with rangeOfString and using the startIndex property. That looks helpful for me to define the indexOf method.  </p>
  
  <p>But I think that rangeOfString only starts searching from the beginning of a string. Is this correct? And if so, how can I search in reverse direction (from end to start of the string)?</p>
  
  <p>What I mean is to have f.e. the string "hello world" and if I start searching for "l" then I want to find the letter at position 9 and not at position 2.</p>