Strings and Bytes
String Formatting
Param
Type
Required
source s: string = FormatString {
format: "$y dollars + 1 dollar is $x dollars ($$${x})",
x: 3,
y: 2
};
s == "2 dollars + 1 dollar is 3 dollars ($3)"Slice
Param
Type
Required
source s: string = Slice {
source: "Hello world",
start: 2,
length: 3
};
s == "llo"
source b: bytes = Slice {
source: bytes(0x12345678),
start: 0,
length: 2
};
b == bytes(0x1234)Join Strings
Param
Type
Required
source s: string = JoinStrings {
strings: list(
"First string",
"2nd",
"another"
),
delimiter: ", "
};
s == "First string, 2nd, another"Format Decimals
Param
Type
Required
Prettify Number
Param
Type
Required
Last updated