Skip to content
Snippets Groups Projects
Commit f7c8284a authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Hide findLastPathSeparator() from interface.

parent a701cefd
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,11 @@ void truncateFile( std::string const& filename)
ofs.close();
}
/** Finds the position of last file path separator.
* Checks for unix or windows file path separators in given path and returns the
* position of the last one or std::string::npos if no file path separator was
* found.
*/
size_t findLastPathSeparator(std::string const& path)
{
return path.find_last_of("/\\");
......
......@@ -21,13 +21,6 @@
namespace BaseLib
{
/** Finds the position of last file path separator.
* Checks for unix or windows file path separators in given path and returns the
* position of the last one or std::string::npos if no file path separator was
* found.
*/
size_t findLastPathSeparator(std::string const& path);
/**
* \brief Returns true if given file exists. From http://www.techbytes.ca/techbyte103.html
*
......
......@@ -8,6 +8,7 @@
#include "gtest.h"
#include "FileTools.h"
#include "FileTools.cpp"
TEST(BaseLib, FindLastPathSeparatorWin)
{
......
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