Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 498 Bytes

interpolation.md

File metadata and controls

25 lines (18 loc) · 498 Bytes

TOC Prev Next

Expressions

Interpolation

String and bytes literals support interpolation.

Any valid CUE expression may be used inside the escaped parentheses. Interpolation may also be used in multiline string and byte literals.

interpolation.cue:

"You are \( cost - budget ) dollars over budget!"

cost:   102
budget: 88

$ cue eval interpolation.cue

"You are 14 dollars over budget!"