| 1 | fn interpolate_str() string { |
| 2 | a := 'hallo' |
| 3 | x := '>${a:8.3s}<' |
| 4 | y := '${a:G}' |
| 5 | z := '${a:d}' |
| 6 | return x + y + z |
| 7 | } |
| 8 | |
| 9 | fn interpolate_f64() string { |
| 10 | b := 1367.57 |
| 11 | x := '>${b:20s}<' |
| 12 | y := '${b:d}' |
| 13 | return x + y |
| 14 | } |
| 15 | |
| 16 | fn interpolate_int() string { |
| 17 | u := u32(15) |
| 18 | s := -12 |
| 19 | x := '${u:13d}' |
| 20 | y := '${s:04u}' |
| 21 | z := '${s:f}' |
| 22 | q := '${u:v}' |
| 23 | return x + y + z + q |
| 24 | } |
| 25 |