Skip to content

Commit 062868f

Browse files
committed
Add string format info to documentation
1 parent 185232e commit 062868f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Documentation.md

+7
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ pprintf("Int with 10 characters indentation: {10}\n", 123);
3131
pprintf("Unsigned long long or whatever in hex notation: {#8x}\n", static_cast<unsigned long long>(0x123));
3232
```
3333
34+
### Printing Strings
35+
36+
It would easily be possible, to transform `pprintf("{}", "some string");` to `printf("%s", "some string");`.
37+
For safety reasons, i decided to *not* automatically print everything as a string, which looks like a character array.
38+
39+
In order to print such a string, please put an "s" between the braces: `{s}`: `pprintf("{s}", "some string");`.
40+
3441
### Printing Actual `{` Braces
3542
3643
Braces can be normally printed as before `pprintpp`, but the opening ones have to be masked in order to

0 commit comments

Comments
 (0)