title: What is the more elegant way to remove all characters after specific character in the String object in Swift
body: <p>What is the more elegant way to remove all characters after specific character in the <code>String</code> object in Swift?</p>
  <p>Suppose that I have the following string: <code>str.str</code> and I need to remove the <code>.str</code> from it. How can I do it?</p>
  <p>Thanks in advance.</p>