:=
operator. Strings (like other variables) are immutable by default. One is free to use ""
or ''
to denote a string. When using vfmt
all double-quoted strings will be converted to single-quoted ones unless it contains a single quote character..len
.$
in front of the variable:${}
:+
operator.+=
operator. Since strings are immutable by default it is only possible to do this if they are declared with mut
.some_string[start..end]
syntax the end
is not inclusive.age
is an int
:.str()
or use string interpolation (preferred):``
. Raw strings can be defined as prepending r
. They are not escaped.