doc: document string.int()
parent
97ebecc5f4
commit
766ed20bf3
|
@ -455,6 +455,15 @@ s := r'hello\nworld'
|
||||||
println(s) // "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
|
### String interpolation
|
||||||
|
|
||||||
Basic interpolation syntax is pretty simple - use `$` before a variable name.
|
Basic interpolation syntax is pretty simple - use `$` before a variable name.
|
||||||
|
|
Loading…
Reference in New Issue