Sha256: 887b07c8230298acfebe5a825065346d4e33d00dc76e8a6978d95bf8c16607bb

Contents?: true

Size: 451 Bytes

Versions: 75

Compression:

Stored size: 451 Bytes

Contents

import std.algorithm, std.conv, std.functional,
    std.math, std.regex, std.stdio;

alias round = pipe!(to!real, std.math.round, to!string);
static reFloatingPoint = ctRegex!`[0-9]+\.[0-9]+`;

void main()
{
    // Replace anything that looks like a real
    // number with the rounded equivalent.
    stdin
        .byLine
        .map!(l => l.replaceAll!(c => c.hit.round)
                                (reFloatingPoint))
        .each!writeln;
}

Version data entries

75 entries across 73 versions & 8 rubygems

Version Path
rouge-4.5.1 lib/rouge/demos/d
rouge-4.5.0 lib/rouge/demos/d
rouge-4.4.0 lib/rouge/demos/d
rouge-4.3.0 lib/rouge/demos/d
rouge-4.2.1 lib/rouge/demos/d
rouge-4.2.0 lib/rouge/demos/d
rouge-4.1.3 lib/rouge/demos/d
rouge-4.1.2 lib/rouge/demos/d
rouge-4.1.1 lib/rouge/demos/d
mumukit-content-type-1.12.1 vendor/bundle/ruby/2.7.0/gems/rouge-3.30.0/lib/rouge/demos/d
mumukit-content-type-1.12.0 vendor/bundle/ruby/2.7.0/gems/rouge-3.30.0/lib/rouge/demos/d
rouge-4.1.0 lib/rouge/demos/d
rouge-4.0.1 lib/rouge/demos/d
rouge-4.0.0 lib/rouge/demos/d
rouge-3.30.0 lib/rouge/demos/d
rouge-3.29.0 lib/rouge/demos/d
rouge-3.28.0 lib/rouge/demos/d
rouge-3.27.0 lib/rouge/demos/d
rouge-3.26.1 lib/rouge/demos/d
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/rouge-3.26.0/lib/rouge/demos/d