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

Style.

parent 6ccf3866
No related branches found
No related tags found
No related merge requests found
...@@ -76,12 +76,12 @@ size_t findLastDot(std::string const& path) ...@@ -76,12 +76,12 @@ size_t findLastDot(std::string const& path)
std::string dropFileExtension(std::string const& filename) std::string dropFileExtension(std::string const& filename)
{ {
// Look for dots in filename. // Look for dots in filename.
const size_t p = findLastDot(filename); const size_t p = findLastDot(filename);
if (p == std::string::npos) if (p == std::string::npos)
return filename; return filename;
// Check position of the last path separator. // Check position of the last path separator.
const size_t s = findLastPathSeparator(filename); const size_t s = findLastPathSeparator(filename);
if (s != std::string::npos && p < s) if (s != std::string::npos && p < s)
return filename; return filename;
......
...@@ -72,7 +72,8 @@ std::string getFileExtension(std::string const& filename); ...@@ -72,7 +72,8 @@ std::string getFileExtension(std::string const& filename);
* insensitive done by converting to upper case with the std::toupper() * insensitive done by converting to upper case with the std::toupper()
* function. * function.
*/ */
bool hasFileExtension(std::string const& extension, std::string const& filename); bool hasFileExtension(std::string const& extension,
std::string const& filename);
/** Returns a string with file extension as found by getFileExtension() /** Returns a string with file extension as found by getFileExtension()
* dropped. * dropped.
...@@ -83,7 +84,8 @@ std::string dropFileExtension(std::string const& filename); ...@@ -83,7 +84,8 @@ std::string dropFileExtension(std::string const& filename);
* Checks if file_name already contains a qualified path and if not copies the * Checks if file_name already contains a qualified path and if not copies the
* path from source. * path from source.
*/ */
std::string copyPathToFileName(const std::string &file_name, const std::string &source); std::string copyPathToFileName(const std::string &file_name,
const std::string &source);
/** /**
* Extracts the path of a pathname. * Extracts the path of a pathname.
......
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