title: Remove all string after a space
body: <p>I have this variable </p>
  
  <p>c#</p>
  
  <pre><code>string text = "val1  val2";
  </code></pre>
  
  <p>javastript</p>
  
  <pre><code>var text = "val1  val2"
  </code></pre>
  
  <p>I need a example to remove everything after the space so that the result is 
   <code>string textModified = "val1";</code></p>
  
  <p>Can u help me?</p>