MCPcopy Create free account
hub / github.com/Z3Prover/z3 / mkString

Method mkString

src/api/java/Context.java:2162–2173  ·  view source on GitHub ↗

Create a string constant.

(String s)

Source from the content-addressed store, hash-verified

2160 * Create a string constant.
2161 */
2162 public SeqExpr<CharSort> mkString(String s)
2163 {
2164 StringBuilder buf = new StringBuilder();
2165 for (int i = 0; i < s.length(); i += Character.charCount(s.codePointAt(i))) {
2166 int code = s.codePointAt(i);
2167 if (code <= 32 || 127 < code)
2168 buf.append(String.format("\\u{%x}", code));
2169 else
2170 buf.append(s.charAt(i));
2171 }
2172 return (SeqExpr<CharSort>) Expr.create(this, Native.mkString(nCtx(), buf.toString()));
2173 }
2174
2175 /**
2176 * Convert an integer expression to a string.

Callers 1

stringExampleMethod · 0.95

Calls 5

createMethod · 0.95
nCtxMethod · 0.95
lengthMethod · 0.65
toStringMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected