diff options
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 9574624..1e2de6e 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1047,3 +1047,11 @@ std::string cmSystemTools::ConvertToOutputPath(const char* path) #endif } +bool cmSystemTools::StringEndsWith(const char* str1, const char* str2) +{ + if ( !str1 || !str2 || strlen(str1) < strlen(str2) ) + { + return 0; + } + return !strncmp(str1 + (strlen(str1)-strlen(str2)), str2, strlen(str2)); +} |