title: Getting index of a character in NSString with offset & using substring in Objective-C
body: <p>I have a string!</p>
  
  <pre><code>   NSString *myString=[NSString stringWithFormat:@"This is my lovely string"];
  </code></pre>
  
  <p>What I want to do is:</p>
  
  <ol>
  <li>Assuming the first character in the string is at index 0. Go to the 11th character (That is 'l' in the above case), and find the position of first occurring space backwards (In the above string, the position of first occurring space if we go backwards from 'l' is at position 10). Let's call the index of this space 'leSpace' having value 10.</li>
  <li><p>Substring the remaining string to a new string using ... </p>
  
  <pre><code>[myString substringFromIndex:leSpace]
  </code></pre></li>
  </ol>
  
  <p>...I hope I have explained well. Please help, can you write a snippet or something to help me do this task?</p>