3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-01-07 14:05:06 -08:00
parent 0bc8518cb5
commit 6013d5da47

View file

@ -2016,7 +2016,15 @@ public class Context implements AutoCloseable {
*/
public SeqExpr<CharSort> mkString(String s)
{
return (SeqExpr<CharSort>) Expr.create(this, Native.mkString(nCtx(), s));
StringBuilder buf = new StringBuilder();
for (int i = 0; i < s.length(); ++i) {
int code = s.codePointAt(i);
if (code <= 32 || 127 < code)
buf.append(String.format("\\u{%x}", code));
else
buf.append(s.charAt(i));
}
return (SeqExpr<CharSort>) Expr.create(this, Native.mkString(nCtx(), buf.toString()));
}
/**