summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-02-27 16:52:57 -0600
committerGitHub <noreply@github.com>2018-02-27 16:52:57 -0600
commit7f33294261869ab8f0caa8660222576a4ff7bcdc (patch)
tree51937131d7d3ef465f75157f6b6581547cf49a6a /src/util
parent9f5447f5ca07688ff7e6da7973d7f97d17678427 (diff)
Improve rewriter for string indexof (#1592)
Diffstat (limited to 'src/util')
-rw-r--r--src/util/regexp.cpp5
-rw-r--r--src/util/regexp.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/util/regexp.cpp b/src/util/regexp.cpp
index d93c5426e..a7e5131ec 100644
--- a/src/util/regexp.cpp
+++ b/src/util/regexp.cpp
@@ -371,6 +371,11 @@ bool String::isDigit(unsigned character)
return c >= '0' && c <= '9';
}
+size_t String::maxSize()
+{
+ return std::numeric_limits<size_t>::max();
+}
+
int String::toNumber() const {
if (isNumber()) {
int ret = 0;
diff --git a/src/util/regexp.h b/src/util/regexp.h
index d51ef4372..efbb4579d 100644
--- a/src/util/regexp.h
+++ b/src/util/regexp.h
@@ -163,6 +163,11 @@ class CVC4_PUBLIC String {
*/
static bool isDigit(unsigned character);
+ /**
+ * Returns the maximum length of string representable by this class.
+ * Corresponds to the maximum size of d_str.
+ */
+ static size_t maxSize();
private:
// guarded
static unsigned char hexToDec(unsigned char c);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback