stri 0.0.2
string interpolation library
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
stri: string interpolation library for D
D language library emulates Scala's string interpolation.
how to use
import stri : s;
# runtime/compile-time variables
auto a = 1;
enum _a0 = "D-lang";
struct A {
static a = 0.123;
}
# you can use the default %s and custom format e.g., %03d
mixin s!"${a} is one. ${_a0} is nice. ${a%03d}, ${A.a%.3f}" i;
assert(i.str == "1 is one. D-lang is nice. 001");
- 0.0.2 released 6 years ago
- ShigekiKarita/stri
- BSL-1.0
- Copyright © 2018, karita
- Authors:
- Dependencies:
- none
- Versions:
-
0.0.2 2018-Jul-29 0.0.1 2018-Jul-29 ~master 2018-Jul-29 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
0 downloads total
-
- Score:
- 0.1
- Short URL:
- stri.dub.pm