Skip to content
Snippets Groups Projects
Commit 4389345a authored by Dmitri Naumov's avatar Dmitri Naumov Committed by Dmitrij Naumov
Browse files

Correct getSuffixFromPath().

parent 40312790
No related branches found
No related tags found
No related merge requests found
......@@ -80,9 +80,12 @@ std::string getFileNameFromPath(const std::string &str, bool with_extension)
return file.substr(0,end);
}
std::string getSuffixFromPath(const std::string &str)
std::string getSuffixFromPath(const std::string &path)
{
const std::string str = getFileNameFromPath(path, true);
std::string::size_type beg(str.find_last_of('.'));
if (beg == std::string::npos)
return std::string();
return str.substr(beg+1, str.length()-beg-1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment