Add syntax documentation with tentative version target

pull/8513/head
Laurin-Luis Lehning 4 years ago committed by Xavier Claessens
parent c787b28e3a
commit 3739780b0e
  1. 16
      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 As can be seen, the formatting works by replacing placeholders of type
`@number@` with the corresponding argument. `@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 ### String methods
Strings also support a number of other methods that return transformed Strings also support a number of other methods that return transformed

Loading…
Cancel
Save