Esc

escape_attribute

procedureextensionexperimentalsince 0.36.1Source
  • macOS: escape_attribute works on macOS
  • Linux: escape_attribute works on Linux
  • Windows: escape_attribute works on Windows
  • Wasm: escape_attribute is not available on Wasm

Escapes quoted attributes, including both quote styles.

Signature

escape_attribute :: (out: *Out, s: string)
Example
out: Out;
defer deinit(*out);
escape_attribute(*out, "\"'");
assert(to_string(*out) == ""'");

See also