SplitScript reference / Display
Display
capability
capability Display
Supports conversion to a user-facing textual representation.
An as String cast, string interpolation, print, and setVariable all display values through this single capability. Source records, enums, and opted-in standard-library containers fall back to their derived Debug representation when no exact Display.toString implementation exists.
Examples
Display a value without an explicit string conversion
let scoreText = `Score: {42}`
Implemented by
| Member | Description | Available through |
|---|---|---|
| FileVersion | A four-part numeric Windows executable version. | |
| None | Stores the single unit value None. | |
| String | Stores ordinary immutable UTF-8 text in WebAssembly GC memory. | |
| address | Stores a process address. | |
| bool | Stores a boolean value. | |
| char | Stores one Unicode scalar value. | |
| f32 | Stores a 32-bit floating-point number. | |
| f64 | Stores a 64-bit floating-point number. | |
| i16 | Stores a 16-bit signed integer. | |
| i32 | Stores a 32-bit signed integer. | |
| i64 | Stores a 64-bit signed integer. | |
| i8 | Stores an 8-bit signed integer. | |
| u16 | Stores a 16-bit unsigned integer. | |
| u32 | Stores a 32-bit unsigned integer. | |
| u64 | Stores a 64-bit unsigned integer. | |
| u8 | Stores an 8-bit unsigned integer. |
Methods
| Member | Description | Available through |
|---|---|---|
| toString | Converts the receiver to its user-facing string representation. |