1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Files
v/vlib/v/fmt/tests/string_interpolation_keep.vv
2021-05-25 07:45:32 +03:00

18 lines
395 B
V

import os
fn main() {
println('Hello world, args: $os.args')
i := 123
a := 'abc'
b := 'xyz'
e := 'a: $a b: $b i: $i'
d := 'a: ${a:5s} b: ${b:-5s} i: ${i:20d}'
f := 'a byte string'.bytes()
println('a: $a $b xxx')
eprintln('e: $e')
_ = ' ${foo.method(bar).str()} '
println('(${some_struct.@type}, $some_struct.y)')
_ := 'CastExpr ${int(d.e).str()}'
println('${f[0..4].bytestr()}')
}