diff options
Diffstat (limited to 'src/util/regexp.cpp')
-rw-r--r-- | src/util/regexp.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/regexp.cpp b/src/util/regexp.cpp index ee63308ab..4dfe68b51 100644 --- a/src/util/regexp.cpp +++ b/src/util/regexp.cpp @@ -462,6 +462,13 @@ String String::substr(std::size_t i, std::size_t j) const { return String(ret_vec); } +bool String::noOverlapWith(const String& y) const +{ + return y.find(*this) == std::string::npos + && this->find(y) == std::string::npos && this->overlap(y) == 0 + && y.overlap(*this) == 0; +} + bool String::isNumber() const { if (d_str.empty()) { return false; |