# std.zig.fmt escaped string formatting recognizes single quote style · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/3f844cba0b601186bb20efa6090e944b9267f538)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 3f844cba0b601186bb20efa6090e944b9267f538

Requested commit: 3f844cba0b601186bb20efa6090e944b9267f538

Commit: 3f844cba0b601186bb20efa6090e944b9267f538

Tree: 1fe8a2020b0bf8293bfbea43a8a6835eeac4eb8e

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.zig.fmt escaped string formatting recognizes single quote style

This introduces {'} to indicate escape for a single-quoted string,
and {} to indicate escape for a double quoted string.

Without this, there would be unnecessary \' inside double quoted
strings, and unnecessary \" inside single quoted strings.

Motivated by the llvm12 branch, in the new tool I am writing for
updating target CPU features.

```

## Parents

- [081698156141ba16a168d9448b9883c0f5a3edd0](https://git.cafe/gitcafe/zig/commit/081698156141ba16a168d9448b9883c0f5a3edd0?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/3f844cba0b601186bb20efa6090e944b9267f538?format=markdown)
