3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 00:55:31 +00:00

updated C++ API for escaped and unescaped strings #5615

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-10-21 14:52:59 -04:00
parent 05e7ed9637
commit f05ac8a429
5 changed files with 18 additions and 14 deletions

View file

@ -1249,10 +1249,14 @@ void recfun_example() {
static void string_values() {
context c;
std::cout << "string_values\n";
expr s = c.string_val("abc\n\n\0\0", 7);
std::cout << s << "\n";
std::string s1 = s.get_string();
std::cout << s1 << "\n";
std::vector<unsigned> buffer = s.get_wstring();
for (unsigned ch : buffer)
std::cout << "char: " << ch << "\n";
}
expr MakeStringConstant(context* context, std::string value) {