C++ find whitespaces in substring : <p>I want to know how can I find empty or whitespaces within substring in C++. For example:</p>

<pre><code>string str = "( )"; // or str = "()"
</code></pre>

<p>Here, I want to make sure there is always something in between parenthesis. Function isspace() takes only one character so I have to search in loop. Is there any better way to do this? Thanks for your help.</p>
