MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / StrToCode

Function StrToCode

lean_py/z3/core.py:4239–4245  ·  view source on GitHub ↗

Convert single-char string to character code.

(s: StringRef)

Source from the content-addressed store, hash-verified

4237
4238
4239def StrToCode(s: StringRef) -> ArithRef:
4240 """Convert single-char string to character code."""
4241 return ArithRef(
4242 AppNode(_AstVar("str.to_code"), (s._ast,)),
4243 IntSort(),
4244 s._vars,
4245 )
4246
4247
4248def StrFromCode(c: ArithRef) -> StringRef:

Callers 1

test_str_to_codeMethod · 0.90

Calls 3

AppNodeClass · 0.90
ArithRefClass · 0.85
IntSortFunction · 0.85

Tested by 1

test_str_to_codeMethod · 0.72