Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grafcube/racket-string-interpolation
Racket package for string interpolation syntax in string literals.
https://github.com/grafcube/racket-string-interpolation
package racket racket-lang racket-language racket-library string-formatting string-interpolation
Last synced: about 1 month ago
JSON representation
Racket package for string interpolation syntax in string literals.
- Host: GitHub
- URL: https://github.com/grafcube/racket-string-interpolation
- Owner: Grafcube
- License: apache-2.0
- Created: 2023-03-06T10:32:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-06T03:42:33.000Z (9 months ago)
- Last Synced: 2024-03-06T04:38:47.282Z (9 months ago)
- Topics: package, racket, racket-lang, racket-language, racket-library, string-formatting, string-interpolation
- Language: Racket
- Homepage: https://pkgd.racket-lang.org/pkgn/package/string-interpolation
- Size: 11.7 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# string-interpolation for Racket
This package adds string interpolation to Racket string literals.
Based on [this comment](https://news.ycombinator.com/item?id=14242481#14244305).
Modified to also have escape syntax.Use racket in strings with the `"@{
}"` syntax.
```racket
#lang racket(require string-interpolation)
(define (greet name) "Hello @{name}")
(greet "Racket")
```This results in `"Hello Racket"`.
You can escape this with the `"@\{
}"` syntax.
```racket
#lang racket(require string-interpolation)
(define (greet name) "Hello @\\{name}")
(greet "Racket")
```This results in `"Hello @{name}"`.