|
|
@ -291,6 +291,14 @@ str::startswith(const string &str_, |
|
|
(str_.compare(0,prefix_.size(),prefix_) == 0)); |
|
|
(str_.compare(0,prefix_.size(),prefix_) == 0)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool |
|
|
|
|
|
str::startswith(const string &str_, |
|
|
|
|
|
const char *prefix_) |
|
|
|
|
|
{ |
|
|
|
|
|
return ((str_.size() >= prefix_.size()) && |
|
|
|
|
|
(str_.compare(0,prefix_.size(),prefix_) == 0)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
bool |
|
|
bool |
|
|
str::endswith(const string &str_, |
|
|
str::endswith(const string &str_, |
|
|
const string &suffix_) |
|
|
const string &suffix_) |
|
|
|