Grafcube / racket-string-interpolation

Racket package for string interpolation syntax in string literals.

Home Page:https://pkgd.racket-lang.org/pkgn/package/string-interpolation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

string-interpolation for Racket

This package adds string interpolation to Racket string literals.

Based on this comment. Modified to also have escape syntax.

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}".

About

Racket package for string interpolation syntax in string literals.

https://pkgd.racket-lang.org/pkgn/package/string-interpolation

License:Apache License 2.0


Languages

Language:Racket 100.0%