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

Dub version

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");
Authors:
  • karita
Dependencies:
none
Versions:
0.0.2 2018-Jul-29
0.0.1 2018-Jul-29
~master 2018-Jul-29
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 23 downloads total

Score:
0.1
Short URL:
stri.dub.pm