From 766ed20bf39384ca5f5053c029226aa27ae2e8cd Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 20 Jan 2021 06:16:39 +0100 Subject: [PATCH] doc: document string.int() --- doc/docs.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/docs.md b/doc/docs.md index 3be3d59131..027c161f02 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -455,6 +455,15 @@ s := r'hello\nworld' println(s) // "hello\nworld" ``` +Strings can be easily converted to number types: + +```v +s := '42' +n := s.int() // 42 +b := s.byte() +u := s.u32() +``` + ### String interpolation Basic interpolation syntax is pretty simple - use `$` before a variable name.