doc: document string.int()

pull/8051/head
Alexander Medvednikov 2021-01-20 06:16:39 +01:00 committed by GitHub
parent 97ebecc5f4
commit 766ed20bf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -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.