Counter!char counter; counter.put("Ми"); assert(counter.count == 4); counter.put('р'); // Cyrillic assert(counter.count == 6);
Counter!wchar counter; counter.put("Ми"); assert(counter.count == 2); counter.put('р'); // Cyrillic assert(counter.count == 3);
Counter!int counter; import std.algorithm: until; counter.put([1, 2, 3, 4, 5].until(3));
Data size counter.
Does not store anything.