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

add get_lstring per #2286

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-05-22 10:31:12 +04:00
parent b2845d888e
commit 082a0f4df4
2 changed files with 30 additions and 0 deletions

View file

@ -1213,6 +1213,14 @@ void recfun_example() {
prove(f(x,c.bool_val(false)) > x);
}
static void string_values() {
context c;
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";
}
int main() {
try {
@ -1263,6 +1271,7 @@ int main() {
parse_string(); std::cout << "\n";
mk_model_example(); std::cout << "\n";
recfun_example(); std::cout << "\n";
string_values(); std::cout << "\n";
std::cout << "done\n";
}
catch (exception & ex) {