title: Get the string up to a specific character
body: <pre><code>var hello = "hello, how are you?"
  
  var hello2 = "hello, how are you @tom?"
  </code></pre>
  
  <p>i want to delete every letter behind the @ sign.</p>
  
  <p>result should be </p>
  
  <pre><code>var hello2 = "hello, how are you @tom?"
  -&gt;
  hello2.trimmed() 
  
  print(hello2.trimmed())
  
  -&gt; "hello, how are you"
  </code></pre>
  
  <p><strong>Update</strong>
  As i want to use it to link multiple users and replace the space behind @sign with the correct name, I always need the reference to the latest occurrence of the @sign to replace it.</p>
  
  <pre><code>text3 = "hey i love you @Tom @Marcus @Peter"
  </code></pre>
  
  <p>Example what the final version should look like</p>
  
  <p>to start off</p>
  
  <p>var text = "hello @tom @mark @mathias"</p>
  
  <p>i want to always get the index of the latest @ sign in the text</p>