mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 10:25:18 +00:00
adding unicode fixup base on #4939 discussion
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a526eea123
commit
49aebdbb02
|
@ -10138,6 +10138,7 @@ def is_string_value(a):
|
|||
|
||||
def StringVal(s, ctx=None):
|
||||
"""create a string expression"""
|
||||
s = "".join(str(ch) if ord(ch) < 128 else "\\u{%x}" % (ord(ch)) for ch in s)
|
||||
ctx = _get_ctx(ctx)
|
||||
return SeqRef(Z3_mk_lstring(ctx.ref(), len(s), s), ctx)
|
||||
|
||||
|
|
Loading…
Reference in a new issue