diff options
author | Simon Ser <contact@emersion.fr> | 2021-04-06 11:26:53 +0200 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-04-06 08:15:03 -0400 |
commit | 974e49fe0e18dccd479656203f9d9a1b1ec7e6c4 (patch) | |
tree | 9ba900166b54b94d177e5ec85baeab2d9470f79f /docs | |
parent | 016feca6ddd22c92f2d8b7e1e9d628ccbfc012cd (diff) | |
download | meson-974e49fe0e18dccd479656203f9d9a1b1ec7e6c4.zip meson-974e49fe0e18dccd479656203f9d9a1b1ec7e6c4.tar.gz meson-974e49fe0e18dccd479656203f9d9a1b1ec7e6c4.tar.bz2 |
docs: document bool to_int and to_string methods
This documents the bool methods to_int and to_string implemented in
[1].
[1]: https://github.com/mesonbuild/meson/blob/a9e9b7c7501a3c8a5984a93879d1f309bf8c72aa/mesonbuild/interpreterbase.py#L1109
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Syntax.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md index 9ed3227..4e3d422 100644 --- a/docs/markdown/Syntax.md +++ b/docs/markdown/Syntax.md @@ -93,6 +93,14 @@ A boolean is either `true` or `false`. truth = true ``` +Booleans can be converted to a string or to a number: + +```meson +bool_var = true +string_var = bool_var.to_string() +int_var = bool_var.to_int() +``` + ## Strings Strings in Meson are declared with single quotes. To enter a literal |