char_to_smt

Function char_to_smt 

Source
pub fn char_to_smt(x: u32) -> String
Expand description

Convert integer x (interpreted as a Unicode codepoint) to a string in the SMT syntax:

  1. printable ASCII characters (other than double quote) are unchanged
  2. a double quote is converted to two double quotes
  3. non-printable ASCII characters are converted to “\u{xx}” (two hexadecimal digits)
  4. other characters are printed as “\uxxxx” or “\u{xxxxx}”
  5. if x is outside the valid SMT range (i.e., x > 0x2FFFF) then it’s converted to the non-SMT compliant string \u{xxxxxx} with as many hexadecimal digits as required.