This topic is now archived and is closed to further replies.


Take out the filename of a path

Recommended Posts

You can do it with the STL, but I''m not very good with those things. You could std::reverse the sequence, std::find the first "\\" in the reversed sequence, and use std::string::substr with string::size - n to get the path.

If someone knows how to get rid of the ugliness and the inefficiency with standard algorithms or with boost, I''d be interested to know it.


Share this post

Link to post
Share on other sites