Skip to main content

encode_ifc_string

Function encode_ifc_string 

Source
pub fn encode_ifc_string(s: &str) -> Cow<'_, str>
Expand description

Encode a UTF-8 string back to IFC STEP escapes. Inverse of decode_ifc_string for the canonical (non-overlong) forms; kept for STEP writers and round-trip tests.

Printable ASCII is preserved; everything else (and backslash) is escaped as \X\HH, \X2\HHHH\X0\, or \X4\HHHHHHHH\X0\ by code point.