Sha256: 94d5b6989e6261f91c33e071e59ee77fa481154cc06f4615968941aea7e2b980

Contents?: true

Size: 323 Bytes

Versions: 2

Compression:

Stored size: 323 Bytes

Contents

module helloworld;

import std.format;

string hello(const char[] name = "World") {
    return format("Hello, %s!", name);
}

unittest {
    assert(hello() == "Hello, World!");
    assert(hello("Alice") == "Hello, Alice!");
    assert(hello("Bob") == "Hello, Bob!");
    assert(hello("") == "Hello, !");
}

void main () {}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
trackler-2.1.0.27 tracks/dlang/exercises/hello-world/hello_world_example.d
trackler-2.1.0.26 tracks/dlang/exercises/hello-world/hello_world_example.d