string-interpolation
1 Usage
8.12

string-interpolation🔗ℹ

Grafcube

 (require string-interpolation)
  package: string-interpolation

Adds string interpolation syntax for all string literals.

Based on this comment but modified to include escape syntax.

1 Usage🔗ℹ

Use racket in strings with the "@{<code>}" syntax.

#lang racket
 
(require string-interpolation)
 
(define (greet name) "Hello @{name}")
(greet "Racket")

This results in "Hello Racket".

You can escape this with the "@\\{<code>}" syntax.

#lang racket
 
(require string-interpolation)
 
(define (greet name) "Hello @\\{name}")
(greet "Racket")

This results in "Hello @{name}".