mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
doc: document string.int()
This commit is contained in:
parent
97ebecc5f4
commit
766ed20bf3
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user