title: Check if string contains only whitespace
body: <p>How can I test if a string contains only whitespace?</p>
  <p>Example strings:</p>
  <ul>
  <li><p><code>&quot;   &quot;</code> (space, space, space)</p>
  </li>
  <li><p><code>&quot; \t \n &quot;</code> (space, tab, space, newline, space)</p>
  </li>
  <li><p><code>&quot;\n\n\n\t\n&quot;</code> (newline, newline, newline, tab, newline)</p>
  </li>
  </ul>