Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions std/uni.d
Original file line number Diff line number Diff line change
Expand Up @@ -4929,15 +4929,14 @@ template Utf8Matcher()

bool lookup(int size, Mode mode, Range)(ref Range inp) const pure @trusted
{
import std.typecons : staticIota;
if (inp.length < size)
{
badEncoding();
return false;
}
char[size] needle = void;
needle[0] = leadMask!size & inp[0];
foreach (i; staticIota!(1, size))
static foreach (i; 1 .. size)
{
needle[i] = truncate(inp[i]);
}
Expand Down Expand Up @@ -5634,7 +5633,7 @@ template Sequence(size_t start, size_t end)
{
import std.stdio : writefln, writeln;
writeln("---TRIE FOOTPRINT STATS---");
foreach (i; staticIota!(0, t.table.dim) )
static foreach (i; 0 .. t.table.dim)
{
writefln("lvl%s = %s bytes; %s pages"
, i, t.bytes!i, t.pages!i);
Expand All @@ -5643,7 +5642,7 @@ template Sequence(size_t start, size_t end)
version(none)
{
writeln("INDEX (excluding value level):");
foreach (i; staticIota!(0, t.table.dim-1) )
static foreach (i; 0 .. t.table.dim-1)
writeln(t.table.slice!(i)[0 .. t.table.length!i]);
}
writeln("---------------------------");
Expand Down