diff --git a/src/str.cpp b/src/str.cpp index e1ba1c7e..2446aad7 100644 --- a/src/str.cpp +++ b/src/str.cpp @@ -291,6 +291,14 @@ str::startswith(const string &str_, (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 str::endswith(const string &str_, const string &suffix_)