summaryrefslogtreecommitdiff
path: root/src/util/regexp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/regexp.cpp')
-rw-r--r--src/util/regexp.cpp7
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;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback