title: Check if a string has only white spaces in it
body: <p>How to check if a string has only white spaces in it?</p>
  
  <p>I want to use the condition in <code>if()</code> statement.</p>
  
  <p>For example, </p>
  
  <pre><code>str&lt;-"     " 
  #check if str has only white spaces? example usage 
  if(str != empty)...
  </code></pre>