title: How to remove everything after a character in a string
body: <p>I am getting a variable that holds a string. I want to trim it to first &quot;?&quot; sign, so I can pass it futher.</p>
  <p>For example, I want to always transfrom <code>x = /example?idontwantthis</code> to <code>x = /example?</code></p>