From 397b32b7695ef7eb6e238aad2fd0e9169b54a57e Mon Sep 17 00:00:00 2001 From: Yage Hu Date: Fri, 18 Oct 2024 00:13:06 -0400 Subject: [PATCH] Add high-level binding for string length Signed-off-by: Yage Hu --- z3/src/ast.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/z3/src/ast.rs b/z3/src/ast.rs index eab3a4e9..c2fdc3ad 100644 --- a/z3/src/ast.rs +++ b/z3/src/ast.rs @@ -1177,6 +1177,11 @@ impl<'ctx> String<'ctx> { concat(Z3_mk_seq_concat, String<'ctx>); } + unop! { + /// Gets the length of `Self`. + length(Z3_mk_seq_length, Int<'ctx>); + } + binop! { /// Checks whether `Self` contains a substring contains(Z3_mk_seq_contains, Bool<'ctx>);