ENH: Added ComparePath method.
This commit is contained in:
parent
2ebbf64508
commit
495666742b
@ -1833,6 +1833,16 @@ SystemTools::JoinPath(const kwsys_stl::vector<kwsys_stl::string>& components)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
bool SystemTools::ComparePath(const char* c1, const char* c2)
|
||||||
|
{
|
||||||
|
#if defined(_WIN32) || defined(__APPLE__)
|
||||||
|
return SystemTools::Strucmp(c1, c2) == 0;
|
||||||
|
#else
|
||||||
|
return strcmp(c1, c2) == 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
bool SystemTools::Split(const char* str, kwsys_stl::vector<kwsys_stl::string>& lines)
|
bool SystemTools::Split(const char* str, kwsys_stl::vector<kwsys_stl::string>& lines)
|
||||||
{
|
{
|
||||||
kwsys_stl::string data(str);
|
kwsys_stl::string data(str);
|
||||||
|
@ -273,6 +273,11 @@ public:
|
|||||||
static kwsys_stl::string
|
static kwsys_stl::string
|
||||||
JoinPath(const kwsys_stl::vector<kwsys_stl::string>& components);
|
JoinPath(const kwsys_stl::vector<kwsys_stl::string>& components);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare a path or components of a path.
|
||||||
|
*/
|
||||||
|
static bool ComparePath(const char* c1, const char* c2);
|
||||||
|
|
||||||
///! return path of a full filename (no trailing slashes).
|
///! return path of a full filename (no trailing slashes).
|
||||||
static kwsys_stl::string GetFilenamePath(const kwsys_stl::string&);
|
static kwsys_stl::string GetFilenamePath(const kwsys_stl::string&);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user