diff options
Diffstat (limited to 'src/util/regexp.h')
-rw-r--r-- | src/util/regexp.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/util/regexp.h b/src/util/regexp.h index 1cde53687..731736f72 100644 --- a/src/util/regexp.h +++ b/src/util/regexp.h @@ -109,8 +109,18 @@ class CVC4_PUBLIC String { bool operator<=(const String& y) const { return cmp(y) <= 0; } bool operator>=(const String& y) const { return cmp(y) >= 0; } - bool strncmp(const String& y, const std::size_t np) const; - bool rstrncmp(const String& y, const std::size_t np) const; + /** + * Returns true if this string is equal to y for their first n characters. + * If n is larger than the length of this string or y, this method returns + * true if and only if this string is equal to y. + */ + bool strncmp(const String& y, std::size_t n) const; + /** + * Returns true if this string is equal to y for their last n characters. + * Similar to strncmp, if n is larger than the length of this string or y, + * this method returns true if and only if this string is equal to y. + */ + bool rstrncmp(const String& y, std::size_t n) const; /* toString * Converts this string to a std::string. |