diff options
Diffstat (limited to 'src/util/regexp.cpp')
-rw-r--r-- | src/util/regexp.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/util/regexp.cpp b/src/util/regexp.cpp index 4cbda5147..bfd9cc3a7 100644 --- a/src/util/regexp.cpp +++ b/src/util/regexp.cpp @@ -298,6 +298,26 @@ std::string String::toString(bool useEscSequences) const { return str; } +bool String::isLeq(const String &y) const +{ + for (unsigned i = 0; i < size(); ++i) + { + if (i >= y.size()) + { + return false; + } + if (d_str[i] > y.d_str[i]) + { + return false; + } + if (d_str[i] < y.d_str[i]) + { + return true; + } + } + return true; +} + bool String::isRepeated() const { if (size() > 1) { unsigned int f = d_str[0]; |