Strings and Text
Examples in
V
s := "hello"
s2 := s + " world" // + is used to concatenate strings
println(s2)
mut s3 := "hello "
s3 += "world" // += is used to append to a string
println(s3) // "hello world"
Last Run
:
hello world
hello world
name := 'Bob'
println('Hello, $name!') // `$` is used for string interpolation
Last Run
:
Hello, Bob!