String formatting
String interpolation
REDscript supports string interpolation through a special string literal syntax with the 's' prefix. You can use it to format strings with arbitrary expressions.
The code above gets desugared into:
In the generated code, all types except String
get converted to String
via ToString
.
String addition overloads
The game scripts come with a set of operator overloads that allow you to append values of a number of types to strings, which can be used for basic string formatting.
Last updated