title: Get few characters from string without white space
body: <p>Don't judge my question by it's title. I can do this by two or three PHP string functions.But i want to know is it possible with one simple function.</p>
  
  <p>Here is my question : </p>
  
  <p>I've string like <code>Stack OverFlow</code>. Now i want only 7 characters from it but without space. So my output would be <code>StackOv</code>. When i used <code>substr</code> it gives me <code>Stack O</code> by obvious reason. </p>
  
  <p>I know i can use <code>str_replace</code> or <code>preg_replace</code> to remove space and then use <code>substr</code>. But i want to know if there is other way.</p>