ENH: remove deps to vtkString by using KWSys (a handful of functions have been moved to KWSys)
This commit is contained in:
parent
2415ff678a
commit
effbdf8d8f
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue