title: How to get the first characters in a string? (Swift 3)
body: <p>I want to get a substring out of a string which starts with either <code>"&lt;ONLINE&gt;"</code> or <code>"&lt;OFFLINE&gt;"</code> (which should become my substring). When I try to create a Range object, I can easily access the the first character by using <code>startIndex</code> but how do I get the index of the closing bracket of my substring which will be either the 8th or 9th character of the full string?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>A simple example:</p>
  
  <pre><code>let onlineString:String = "&lt;ONLINE&gt; Message with online tag!"
  
  let substring:String = // Get the "&lt;ONLINE&gt; " part from my string?
  
  let onlineStringWithoutTag:String = onlineString.replaceOccurances(of: substring, with: "")
  
  // What I should get as the result: "Message with online tag!"
  </code></pre>
  
  <p>So basically, the question is: what do I do for <code>substring</code>? </p>