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.cpp20
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];
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback