ENH: remove deps to vtkString by using KWSys (a handful of functions have been moved to KWSys)

This commit is contained in:
Sebastien Barre 2005-03-10 17:49:27 -05:00
parent 2415ff678a
commit effbdf8d8f
1 changed files with 3 additions and 3 deletions

View File

@ -937,18 +937,18 @@ char* SystemTools::ReplaceChars(char* str, const char *toreplace, char replaceme
} }
// Returns if string starts with another string // Returns if string starts with another string
bool vtkString::StringStartsWith(const char* str1, const char* str2) bool SystemTools::StringStartsWith(const char* str1, const char* str2)
{ {
if (!str1 || !str2) if (!str1 || !str2)
{ {
return false; return false;
} }
size_t len1 = strlen(str1), len2 = strlen(str2); size_t len1 = strlen(str1), len2 = strlen(str2);
return len1 >= len2 && !strncmp(str1, str2, len2) ? true : false return len1 >= len2 && !strncmp(str1, str2, len2) ? true : false;
} }
// Returns if string ends with another string // Returns if string ends with another string
bool vtkString::StringEndsWith(const char* str1, const char* str2) bool SystemTools::StringEndsWith(const char* str1, const char* str2)
{ {
if (!str1 || !str2) if (!str1 || !str2)
{ {