1# @ajax/mesh-debug-str
23A string quoted the way Rust's `{:?}` prints a `&str`: in double quotes, with `\"`, `\\`, `\t`, `\r`,
4`\n`, `\0` and `\u{..}` for other control characters. The port's error messages use it so they read
5exactly as the Rust's (`items "x": ...`).
67## Ported from
89[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): the many
10`{s:?}` in `crates/mesh-host`'s messages (`jobs.rs` among them).
1112## Differences
1314Rust also escapes Unicode grapheme extenders and unprintable non-ASCII characters (`\u{..}`); here
15non-ASCII UTF-8 passes through unchanged. The mesh's names and words are ASCII.
1617## Tests
1819`tests/debug_str.c`: every escape, against what `format!("{:?}", s)` prints.
2021## Licence
2223MIT. See the repository's LICENSE.