mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-30 21:07:34 +03:00
ea151030bc
This is intended to replace the common pattern:
print("invalid foobar: '{s}': {t}", ...)
The idea is to not invent imaginary syntax. If the string contained
single quotes for example, this would be a nonsensical error message.
On the other hand with the new pattern:
print("invalid foobar: {q}: {t}", ...)
It's both easier on the eyes at the print site, and also it will allow
the user to copy paste a properly escaped string, should the quoted text
contain any odd characters, including invisible ones like null bytes.