diff options
author | Laurin-Luis Lehning <65224843+e820@users.noreply.github.com> | 2021-03-07 22:54:19 +0100 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-03-10 08:55:22 -0500 |
commit | 3739780b0e0a62f0c088d9413deb9d7bdfbe6700 (patch) | |
tree | 4ec8e0fdf61ff88cd2d10671246a3cb908f1d74c | |
parent | c787b28e3ac1997989e45c9dc7ff05c83826ac6d (diff) | |
download | meson-3739780b0e0a62f0c088d9413deb9d7bdfbe6700.zip meson-3739780b0e0a62f0c088d9413deb9d7bdfbe6700.tar.gz meson-3739780b0e0a62f0c088d9413deb9d7bdfbe6700.tar.bz2 |
Add syntax documentation with tentative version target
-rw-r--r-- | docs/markdown/Syntax.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md index 5579855..e85c2cd 100644 --- a/docs/markdown/Syntax.md +++ b/docs/markdown/Syntax.md @@ -181,6 +181,22 @@ res = template.format('text', 1, true) As can be seen, the formatting works by replacing placeholders of type `@number@` with the corresponding argument. +*(Added 0.58)* + +Format strings can be used as a non-positional alternative to the +string formatting functionality described above. + +```meson +n = 10 +m = 'hi' + +s = f'int: @n@, string: @m@' +# s now has the value 'int: 10, string: hi' +``` + +Currently only identity-expressions are supported inside of format +strings. + ### String methods Strings also support a number of other methods that return transformed |