From b90b69d383d5293345f66dc8f9b55bd53a698542 Mon Sep 17 00:00:00 2001 From: "Michael Hirsch, Ph.D" Date: Thu, 25 Jul 2019 17:38:29 -0400 Subject: note that integers have .to_string() method [skip ci] --- docs/markdown/Reference-manual.md | 1 + docs/markdown/Syntax.md | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'docs/markdown') diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 3a21cef..ee5bcda 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1794,6 +1794,7 @@ are immutable, all operations return their results as a new string. - `is_even()` returns true if the number is even - `is_odd()` returns true if the number is odd + - `to_string()` returns the value of the number as a string. ### `boolean` object diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md index 7802b92..24d9deb 100644 --- a/docs/markdown/Syntax.md +++ b/docs/markdown/Syntax.md @@ -78,6 +78,13 @@ string_var = '42' num = string_var.to_int() ``` +Numbers can be converted to a string: + +```meson +int_var = 42 +string_var = int_var.to_string() +``` + Booleans -- -- cgit v1.1