Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I7e54691aa3e81efcb495124d13e8c24a6a6a6964
20 lines
394 B
Nix
20 lines
394 B
Nix
# Test string interpolation
|
|
let
|
|
name = "world";
|
|
x = 42;
|
|
bool_val = true;
|
|
in {
|
|
# Simple interpolation
|
|
greeting = "Hello ${name}!";
|
|
|
|
# Multiple interpolations
|
|
multi = "x is ${x} and name is ${name}";
|
|
|
|
# Expression evaluation in interpolation
|
|
computed = "x + 10 = ${x + 10}";
|
|
|
|
bool_check = "${bool_val} is true!";
|
|
|
|
# Just a string, no interpolation
|
|
plain = "plain text";
|
|
}
|