dirname(php) similar function in c++
<p>is there is any function in c++ ,similar to <code>dirname</code> in php...it is used to normalize the url </p>

<pre><code>eg
&lt;?php
$url = "../tets/index.html";
$currentURL = "http://example.com/somedir/anotherdir";
echo dirname($currentURL).substr($url, 2);
?&gt;
</code></pre>
