Skip to content

Instantly share code, notes, and snippets.

@blaquee
Created June 7, 2013 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blaquee/5733003 to your computer and use it in GitHub Desktop.
Save blaquee/5733003 to your computer and use it in GitHub Desktop.
Strip Path
// strip filename from path
std::string long_path(link_path);
size_t pos = long_path.find_last_of("/\\");
std::string relative_path = long_path.substr(0,pos);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment