diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/regexp.cpp | 7 | ||||
-rw-r--r-- | src/util/regexp.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/util/regexp.cpp b/src/util/regexp.cpp index 684a480fb..fd5dff994 100644 --- a/src/util/regexp.cpp +++ b/src/util/regexp.cpp @@ -23,6 +23,13 @@ using namespace std; namespace CVC4 {
+void String::getCharSet(std::set<unsigned int> &cset) const {
+ for(std::vector<unsigned int>::const_iterator itr = d_str.begin();
+ itr != d_str.end(); itr++) {
+ cset.insert( *itr );
+ }
+}
+
std::string String::toString() const {
std::string str;
for(unsigned int i=0; i<d_str.size(); ++i) {
diff --git a/src/util/regexp.h b/src/util/regexp.h index 7985f4072..512c2eff0 100644 --- a/src/util/regexp.h +++ b/src/util/regexp.h @@ -23,6 +23,7 @@ #include <iostream> #include <iomanip> #include <string> +#include <set> #include <sstream> #include "util/exception.h" //#include "util/integer.h" @@ -31,7 +32,6 @@ namespace CVC4 { class CVC4_PUBLIC String { - public: static unsigned int convertCharToUnsignedInt( char c ) { int i = (int)c; @@ -342,6 +342,7 @@ public: return -1; } } + void getCharSet(std::set<unsigned int> &cset) const; };/* class String */ namespace strings { |