assert("".countAmong(string[].init) == -1);
assert("".countAmong([""]) == 1);
assert("".countAmong(["_"]) == 0);
assert("".countAmong([" "]) == 0);
assert(" ".countAmong([" "]) == 1);
assert("abc_abc".countAmong(["a"]) == 2);
assert("abc_abc".countAmong(["abc"]) == 2);
assert("_a_a_".countAmong(["_"]) == 3);
assert("_aaa_".countAmong(["a"]) == 3);
assert("".countAmong(string.init) == -1); // -1 instead of `assert` that `std.algorithm.count` does
assert("".countAmong("") == -1); // -1 instead of `assert` that `std.algorithm.count` does
assert(" ".countAmong("") == -1); // -1 instead of `assert` that `std.algorithm.count` does
assert("".countAmong("_") == 0);
assert("".countAmong(" ") == 0);
assert(" ".countAmong(" ") == 1);
assert("abc_abc".countAmong("a") == 2);
assert("abc_abc".countAmong(" ") == 0);
assert("abc_abc".countAmong("ab") == 4);
assert("abc_abc".countAmong("abc") == 6);
assert("_a_a_".countAmong("_") == 3);
assert("_aaa_".countAmong("a") == 3);
Array-specialization of countAmong with default predicate.